Back-and-Forth Equivalence #
This file defines the back-and-forth equivalence relation between tuples in structures, indexed by ordinals. This is the semantic predicate that corresponds to Scott formulas.
Main Definitions #
BFEquiv: The α-back-and-forth equivalence between tuples, indexed by ordinal α.
Main Results #
BFEquiv.zero_iff_sameAtomicType: At level 0, BF-equivalence is atomic type equivalence.BFEquiv.monotone: BF-equivalence at higher ordinals implies equivalence at lower ordinals.BFEquiv.forth/BFEquiv.back: Extension properties at successor ordinals.BFEquiv.symm: BF-equivalence is symmetric.
Implementation Notes #
We use Ordinal.limitRecOn for the definition, which requires handling three cases:
- Zero: same atomic type
- Successor
Order.succ α: equivalence at α plus forth and back conditions - Limit (with
Order.IsSuccLimit): equivalence at all smaller ordinals
Known Limitation: ω-Level Coherence and Quantifier Swap #
A natural approach to proving BFEquiv_omega_implies_equiv (BF-equivalence at ω implies
isomorphism) is to define a "strategy" type that carries explicit witnesses instead of
just existence claims. The inductive definition:
inductive BFStrategy : (k : ℕ) → ... → Type
| zero : SameAtomicType a b → BFStrategy 0 n a b
| succ : BFStrategy k n a b →
(forth : (m : M) → Σ n', BFStrategy k (n+1) ...) → ...
fails Lean's nested-inductive check. However, we CAN define BFStrategy by recursion on k
(this compiles and avoids the kernel restriction). See BFStrategy below.
We then define BFStrategyOmega n a b := ∀ k, BFStrategy k n a b, a coherent family of
strategies at all finite levels. This is the "winning strategy in the ω-round EF game."
The real mathematical issue: Even with these definitions, we have:
BFStrategyOmega → isomorphismis provable (the strategy gives coherent witnesses)BFEquiv ω → BFStrategyOmegais the open problem (possibly false without extra assumptions)
This is the standard model-theory distinction: "BFEquiv holds at all finite levels" (∀ k, Duplicator wins the k-round game) does NOT imply "Duplicator has a winning strategy in the ω-round game," even for countable structures.
The obstruction is the quantifier swap:
From BFEquiv ω: ∀ k, ∃ n'_k, BFEquiv k (snoc a m) (snoc b n'_k)
Need: ∃ n', ∀ k, BFEquiv k (snoc a m) (snoc b n')
Concrete counterexample to such swaps: Let S_k = {n ∈ ℕ | n ≥ k}. Each S_k is non-empty, and S_0 ⊇ S_1 ⊇ S_2 ⊇ ..., but ⋂_k S_k = ∅. The witnesses keep shifting as k grows.
In our setting, S_k = {n' ∈ N | BFEquiv k (snoc a m) (snoc b n')}. By monotonicity of BFEquiv, these sets are decreasing. But without a stabilization property, their intersection may be empty.
Note on alternative approaches:
- Dependent choice does NOT help: even with full AC, ∀ k, ∃ n'_k doesn't yield ∃ n', ∀ k when the sets strictly decrease to empty intersection.
- König's lemma would require finite branching or compactness; not available here since the "tree" of valid witnesses lacks the necessary finiteness properties.
- A game-theoretic formulation (strategy as function on finite plays) might help but still requires proving a winning strategy exists from BFEquiv ω.
Resolution (in Sentence.lean): We use the stabilization approach:
StabilizesForTuples M α n: BFEquiv α ↔ BFEquiv (succ α) for n-tuples from MStabilizesCompletely M α: All tuple sizes stabilize at αexists_complete_stabilization: For countable M, such α < ω₁ existsBFEquiv_stabilization_implies_equiv: At stabilization, BFEquiv → isomorphism
At a complete stabilization ordinal, forth/back witnesses stay at the same level, so the standard back-and-forth closes without quantifier swap issues.
Important: BFEquiv ω is equivalent to elementary equivalence (winning all finite EF games), which does NOT imply isomorphism. Potential counterexamples in relational languages include equivalence relations with matching finite-class structure but different arrangements of infinite classes.
Back-and-forth equivalence at ordinal α between tuples a in M and b in N.
At level 0: same atomic type. At successor α + 1: same atomic type, plus:
- (forth) for every m in M, there exists n in N with BFEquiv α (snoc a m) (snoc b n)
- (back) for every n in N, there exists m in M with BFEquiv α (snoc a m) (snoc b n) At limit λ: BFEquiv β for all β < λ.
Equations
- One or more equations did not get rendered due to their size.
Instances For
BF-equivalence at level α + 1 implies BF-equivalence at level α.
The "forth" property at a successor level.
The "back" property at a successor level.
BF-equivalence is reflexive at all levels.
BF-equivalence is transitive at all levels. If a and b are BF-equivalent, and b and c are BF-equivalent, then a and c are BF-equivalent. Note that a, b, c may be tuples in different structures.
BFStrategy: Explicit Witness Strategies #
A back-and-forth strategy at level k provides explicit witnesses for extensions.
Unlike BFEquiv which only asserts existence, a strategy carries the actual witnesses.
The key insight is that BFStrategy can be defined by recursion on k (not as an
inductive type), avoiding Lean's nested-inductive check that blocks inductive definitions.
The open problem is BFEquiv ω → BFStrategyOmega: this is the quantifier swap obstruction.
Having a strategy implies BFEquiv, but the converse requires choosing coherent witnesses.
Important: BFEquiv ω (winning all finite games) does NOT imply isomorphism in general.
Winning all finite back-and-forth games does not give an ω-round strategy. The Type-valued
BFStrategyT below is genuinely stronger than BFEquiv ω because it carries witnesses.
Type-valued back-and-forth strategy at level k. Carries actual witnesses for extensions.
At level 0: a proof that tuples have the same atomic type (as a subtype of Unit). At level k+1: strategy at level k, plus witness FUNCTIONS (not just existence) for forth/back.
This is STRONGER than BFEquiv k because it provides computational witnesses, not just
existence proofs. The converse BFEquiv k → BFStrategyT k requires Choice and loses coherence.
We use a recursive def (not inductive) to avoid Lean's nested-inductive restrictions.
The base case uses { _ : Unit // SameAtomicType a b } to lift Prop to Type in a universe-
polymorphic way (Subtype lives in the same universe as the carrier type).
Equations
- One or more equations did not get rendered due to their size.
- L.BFStrategyT M N 0 = fun (_n : ℕ) (a : Fin _n → M) (b : Fin _n → N) => { x : PUnit.{(max ?u.187 ?u.186) + 1} // FirstOrder.Language.SameAtomicType a b }
Instances For
A coherent family of Type-valued strategies at all finite levels. This is the "winning strategy in the ω-round EF game" with actual witnesses.
This is STRONGER than BFEquiv ω. The existence of BFStrategyOmegaT implies isomorphism
(provable by standard back-and-forth), but BFEquiv ω alone does not.
Equations
- FirstOrder.Language.BFStrategyOmegaT n a b = ((k : ℕ) → L.BFStrategyT M N k n a b)
Instances For
A Type-valued strategy at level k implies BF-equivalence at level k. This direction is straightforward: just forget the witnesses.
A coherent ω-strategy implies BF-equivalence at level ω.
Universe Lifting for BFEquiv #
BFEquiv is defined by Ordinal.limitRecOn, which is universe-specific. These lemmas
transport BFEquiv between ordinal universes via Ordinal.lift.
Lift BFEquiv from Ordinal.{0} to Ordinal.{w} at a specific ordinal.
If BFEquiv β n a b holds at β : Ordinal.{0}, then it holds at
Ordinal.lift β : Ordinal.{w}.
Lower BFEquiv from Ordinal.{w} back to Ordinal.{0} at a specific ordinal.
If BFEquiv (Ordinal.lift β) n a b holds at the lifted ordinal, then
BFEquiv β n a b holds at the original.