File size: 3,607 Bytes
4a56cd6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | import OAI.SetTheory.PartitionPrinciple.Models.GroundCountableQuotients
namespace OAI
namespace PartitionPilot.Forcing
open Compression.RecursiveMaps
universe u
structure StrictLinearOrderCode (D r : ZFSet.{u}) : Prop where
shape : r β ZFSet.prod D D
irrefl : β x β D, ZFSet.pair x x β r
trans : β x y z, ZFSet.pair x y β r β ZFSet.pair y z β r β ZFSet.pair x z β r
compare : β x β D, β y β D, ZFSet.pair x y β r β¨ x = y β¨ ZFSet.pair y x β r
structure DenseOrderCode (D r : ZFSet.{u}) : Prop extends StrictLinearOrderCode D r where
between : β x y, ZFSet.pair x y β r β β z β D, ZFSet.pair x z β r β§ ZFSet.pair z y β r
def StrictLinearOrderCode.toLinearHeightOrder {D r : ZFSet.{u}} (code : StrictLinearOrderCode D r) :
LinearHeightOrder {x : ZFSet.{u} // x β D} where
lt x y := ZFSet.pair x.val y.val β r
irrefl x := code.irrefl x.val x.property
trans {x y z} := code.trans x.val y.val z.val
compare x y := (code.compare x.val x.property y.val y.property).imp id
(fun h => h.imp (fun equal => Subtype.ext equal) id)
def DenseOrderCode.toDenseHeightOrder {D r : ZFSet.{u}} (code : DenseOrderCode D r) :
DenseHeightOrder {x : ZFSet.{u} // x β D} where
toLinearHeightOrder := code.toStrictLinearOrderCode.toLinearHeightOrder
between x y lower := by
obtain β¨z, hz, left, rightβ© := code.between x.val y.val lower
exact β¨β¨z, hzβ©, left, rightβ©
def intervalCandidate (D r lower upper lo hi x : ZFSet.{u}) : Prop :=
x β D β§ ZFSet.pair lo x β r β§ ZFSet.pair x hi β r β§
(β y β lower, ZFSet.pair y x β r) β§ (β y β upper, ZFSet.pair x y β r)
theorem DenseOrderCode.finite_interval_candidate {D r lower upper lo hi : ZFSet.{u}}
(code : DenseOrderCode D r) (loD : lo β D) (hiD : hi β D)
(lowerD : lower β D) (upperD : upper β D)
(finiteLower : lower.toSet.Finite) (finiteUpper : upper.toSet.Finite)
(gap : ZFSet.pair lo hi β r)
(lowerHi : β x β lower, ZFSet.pair x hi β r)
(loUpper : β y β upper, ZFSet.pair lo y β r)
(separated : β x β lower, β y β upper, ZFSet.pair x y β r) :
β x, intervalCandidate D r lower upper lo hi x := by
classical
have lowerFinite : (Subtype.val β»ΒΉ' lower.toSet : Set {x : ZFSet.{u} // x β D}).Finite :=
Set.Finite.preimage (fun _ _ _ _ equal => Subtype.ext equal) finiteLower
have upperFinite : (Subtype.val β»ΒΉ' upper.toSet : Set {x : ZFSet.{u} // x β D}).Finite :=
Set.Finite.preimage (fun _ _ _ _ equal => Subtype.ext equal) finiteUpper
let lowers := lowerFinite.toFinset.toList
let uppers := upperFinite.toFinset.toList
have lowerSpec (x : {x : ZFSet.{u} // x β D}) : x β lowers β x.val β lower := by
simp only [lowers, Finset.mem_toList, Set.Finite.mem_toFinset, Set.mem_preimage]
rfl
have upperSpec (x : {x : ZFSet.{u} // x β D}) : x β uppers β x.val β upper := by
simp only [uppers, Finset.mem_toList, Set.Finite.mem_toFinset, Set.mem_preimage]
rfl
obtain β¨x, left, right, aboveLower, belowUpperβ© := code.toDenseHeightOrder.finite_gap
β¨lo, loDβ© β¨hi, hiDβ© lowers uppers gap
(fun x hx => lowerHi x.val ((lowerSpec x).1 hx))
(fun y hy => loUpper y.val ((upperSpec y).1 hy))
(fun x hx y hy => separated x.val ((lowerSpec x).1 hx) y.val ((upperSpec y).1 hy))
exact β¨x.val, x.property, left, right,
fun y hy => aboveLower β¨y, lowerD hyβ© ((lowerSpec _).2 hy),
fun y hy => belowUpper β¨y, upperD hyβ© ((upperSpec _).2 hy)β©
end PartitionPilot.Forcing
end OAI
|