I was at the sea and thinking again about פירוש של רב שך of the argument between the חכמים and ר' שמעון in הלכות of סוטה פרק א חלכה ג. And based on that explanation he explains the רמב''ם. At first I was thinking that it seems that according to רב שך that the רמב''ם was פוסק like ר' שמעון against the חכמים, [and that would be a problem if it were the case.] And then it occurred to me that in fact his explanation of the רמב''ם works perfectly.
Perhaps I should give a bit of background so what רב שך is saying will become clear. The statement of the חכמים is a מקוה that upon it pure things were prepared. [food was prepared by someone who at first was a nida or anyone who was impure and went to a מקוה. ] Then the מקוה was found to be lacking the proper volume, ארבעים סאה. All the pure things are unclean whether in a רשות היחיד או רשות הרבים. The גמרא asks from a חבית that is found to be sour. The wine turned to vinegar. This חבית was used for separating tithes. For the last three day all the tithes are considered invalid. Before these three days all the tithes are in doubt. The first explanation of the גמרא is that the מקוה is the חכמים and the חבית is ר' שמעון. AND ר' שמעון would say the מקוה is pure in רשות הרבים and a doubt in a רשות היחיד. Then the second explanation is that ר' שעעון says we learn from the beginning of uncleanliness to the end. Just like at the beginning if one is in doubt if he touched then he is טהור. So also if there is a doubt if one went to the מקוה or not, the אוכלים are clean. The חכמים say we do not learn from the end to the beginning. רב שך says the issue is about שתי חזקות, חזקת השתא and חזקת טומאה against חזקא מעיקרא. רב שך says that in this second explanation of the גמרא, the גמרא is thinking that this case of two חזקות results in a doubt. [This is not like the first way of the גמרא that holds two חזקות against one is a sure thing.] Thus ר' שמעון is clear about the חבית. what he says that it is a doubt. The חבית we know is now vinegar and the טבל starts out as being טבל until we know its status changed. That is two חזקות against one חזקה that the חבית used to be wine so it has a חזקה מעיקרא. But ר' שמעון would not hold this way by the מקוה since there is a general principle that concerning purity and impurity we learn from סוטה. So he learns straight from סוטה. The food prepared by people that went to that מקוה and that מקוה is the רשות הרבים. So that food is pure. If the מקוה was in a רשות היחיד the food is in doubt. But the חכמים do not learn from סוטה, and the גמרא is giving the explanation of why. THEY HOLD we do not learn from the start of impurity to the end. Since we do not learn from סוטה, we put things into the regular category of two חזקות against one. So now we understand that when the חכמים say the food is טמא, that means it is in a state of doubtful purity. And that is exactly like the case of החבית. And that is how the רמב''ם can פוסק like the statement of the חכמים about the מקוה and the statement about the חבית. He is not going like ר' שמעון. Rather by the חבית there is no argument. ALL agree it is a doubt because of two חזקות. The argument is the מקוה and ר שמעון would agree with the חכמים if we would apply the principles of two חזקות here. But he does not. He applies the law of the סוטה. The רשות הרבים in pure and רשות היחיד is a doubt.