From: Martin DeMello Date: 2003-09-18T16:33:16+09:00 Subject: Re: Changing ==,>,<, etc Marcin 'Qrczak' Kowalczyk wrote: > Dnia ?ro 17. wrze?nia 2003 14:54, Martin DeMello napisa?: > >> i.e., there is no reason the LHS should be in the outer loop, rather >> than the RHS. My point was that the only reason there *was* an 'outer >> loop' was that the language forces you to write loops nestedly, whereas >> a cross product (essentially what this is) is flat. > > I disagree. It's essential which is outer and which is inner unless > quantifiers happen to commute (both "any" or both "all"). The decision to > put LHS in the outer loop is arbitrary; if you wanted the other way you > must search for an operator with flipped arguments (which happens to be > easy among the six comparison operators). > >> Also, any(1,2) != any(1,2) should be true. > > I wrote any(1,2) != all(1,2). And what about all(1,2) != any(1,2)? > If they are the same, then "any" and "all" must be treated with different > priority. If they are different, then != is no longer commutative. > (I suspect the latter.) Both cases are unintuitive for me. Good point. I see now that it's analogous to the fact that (forall x)(there exists y)(x != y) is different from (there exists y)(forall x)(x != y) So there is, indeed, as you pointed out, the notion of an inner and an outer quantifier. martin