File size: 5,306 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
import OAI.Combinatorics.InfiniteMatroid.Ideals

namespace OAI

section

open Set Filter
open scoped symmDiff

namespace InfiniteMatroidCounterexample

namespace SubsetIdeal
variable {Ξ± : Type} (K : SubsetIdeal Ξ±) (U : Ultrafilter Ξ±)
  (hUK : βˆ€ N, K.small N β†’ N βˆ‰ U)

include hUK in
lemma large_of_modSubset {X Y : Set α} (hX : X ∈ U) (hXY : K.ModSubset X Y) : Y ∈ U := by
  have hc : (X \ Y)ᢜ ∈ U := Ultrafilter.compl_mem_iff_notMem.mpr (hUK _ hXY)
  exact Filter.mem_of_superset (inter_mem hX hc) (by intro x hx; by_contra hy; exact hx.2 ⟨hx.1, hy⟩)

include hUK in
lemma large_iff_symmDiff {X Y : Set Ξ±} (h : K.small (X βˆ† Y)) : X ∈ U ↔ Y ∈ U := by
  exact ⟨fun hX ↦ K.large_of_modSubset U hUK hX (K.mono h (by simp [symmDiff_def])),
    fun hY ↦ K.large_of_modSubset U hUK hY (K.mono h (by simp [symmDiff_def]))⟩

end SubsetIdeal

/-- The properties of the ordinal rank which are used by the global assembly. -/
structure RankModel (Ξ± : Type) where
  ideal : SubsetIdeal Ξ±
  ultra : Ultrafilter Ξ±
  avoids : βˆ€ N, ideal.small N β†’ N βˆ‰ ultra
  rank : Set Ξ± β†’ CIndex
  antitone : βˆ€ ⦃X Y⦄, X ∈ ultra β†’ Y ∈ ultra β†’ ideal.ModSubset X Y β†’ rank Y ≀ rank X
  thinning : βˆ€ s X, s βŠ† X β†’ s βˆ‰ ultra β†’ X ∈ ultra β†’ βˆ€ Ξ³ : CIndex,
    βˆƒ u, s βŠ† u ∧ u βŠ† X ∧ u ∈ ultra ∧ Ξ³ < rank u

namespace RankModel
variable {Ξ± : Type} (R : RankModel Ξ±)
lemma invariant {X Y : Set Ξ±} (h : R.ideal.small (X βˆ† Y)) :
    (X ∈ R.ultra ↔ Y ∈ R.ultra) ∧ (X ∈ R.ultra β†’ R.rank X = R.rank Y) := by
  have he := R.ideal.large_iff_symmDiff R.ultra R.avoids h
  refine ⟨he, fun hX ↦ le_antisymm ?_ ?_⟩
  Β· exact R.antitone (he.mp hX) hX (R.ideal.mono h (by simp [symmDiff_def]))
  Β· exact R.antitone hX (he.mp hX) (R.ideal.mono h (by simp [symmDiff_def]))
end RankModel

section Construction
variable {Ξ± : Type}
variable (K : SubsetIdeal Ξ±) (G : CIndex β†’ Set Ξ±) (U : Ultrafilter Ξ±)
  (hUK : βˆ€ N, K.small N β†’ N βˆ‰ U) (hG : βˆ€ t, G t ∈ U)
  (hfinite : βˆ€ X, X ∈ U β†’ {t | K.ModSubset X (G t)}.Finite)

lemma exists_large_enumeration [Countable Ξ±] [Infinite Ξ±] : βˆƒ F : CIndex β†’ Set Ξ±,
    (βˆ€ i, F i ∈ U) ∧ βˆ€ X, X ∈ U β†’ βˆƒ i, F i = X := by
  classical
  obtain ⟨e, he⟩ := exists_set_enumeration α
  refine ⟨fun i ↦ if e i ∈ U then e i else univ, ?_, ?_⟩
  Β· intro i
    dsimp only
    split_ifs with h
    Β· exact h
    Β· exact univ_mem
  Β· intro X hX
    obtain ⟨i, hi⟩ := he X
    exact ⟨i, by simp [hi, hX]⟩

variable (F : CIndex β†’ Set Ξ±) (hF : βˆ€ i, F i ∈ U)
  (hFs : βˆ€ X, X ∈ U β†’ βˆƒ i, F i = X)

include hFs in
lemma rank_candidates_nonempty {X : Set α} (hX : X ∈ U) :
    {i | K.ModSubset (F i) X}.Nonempty := by
  obtain ⟨i, rfl⟩ := hFs X hX
  exact ⟨i, K.modSubset_refl _⟩

noncomputable def ordinalRank (X : Set Ξ±) : CIndex := by
  classical
  exact if hX : X ∈ U then wellFounded_lt.min {i | K.ModSubset (F i) X}
    (rank_candidates_nonempty K U F hFs hX)
  else cindexBinaryEquiv.symm (fun _ ↦ false)

lemma ordinalRank_spec {X : Set α} (hX : X ∈ U) :
    K.ModSubset (F (ordinalRank K U F hFs X)) X := by
  rw [ordinalRank, dite_eq_left hX]
  exact (wellFounded_lt (Ξ± := CIndex)).min_mem {i | K.ModSubset (F i) X}
    (rank_candidates_nonempty K U F hFs hX)

lemma ordinalRank_le {X : Set α} (hX : X ∈ U) {i : CIndex} (hi : K.ModSubset (F i) X) :
    ordinalRank K U F hFs X ≀ i := by
  rw [ordinalRank, dite_eq_left hX]
  exact WellFoundedLT.min_le (s := {index | K.ModSubset (F index) X}) hi

lemma ordinalRank_antitone {X Y : Set α} (hX : X ∈ U) (hY : Y ∈ U)
    (hXY : K.ModSubset X Y) : ordinalRank K U F hFs Y ≀ ordinalRank K U F hFs X :=
  ordinalRank_le K U F hFs hY (K.modSubset_trans (ordinalRank_spec K U F hFs hX) hXY)

include hG hfinite hF in
lemma ordinalRank_thinning (s X : Set Ξ±) (hsX : s βŠ† X) (hs : s βˆ‰ U) (hX : X ∈ U)
    (Ξ³ : CIndex) : βˆƒ u, s βŠ† u ∧ u βŠ† X ∧ u ∈ U ∧ Ξ³ < ordinalRank K U F hFs u := by
  classical
  let Y (i : Iic γ) := F i ∩ (X \ s)
  have hY : βˆ€ i, Y i ∈ U := fun i ↦
    inter_mem (hF i) (inter_mem hX (Ultrafilter.compl_mem_iff_notMem.mpr hs))
  obtain ⟨t, ht⟩ := exists_avoid_finite_family (cindex_initial_segment γ)
    (fun i : Iic Ξ³ ↦ {t | K.ModSubset (Y i) (G t)}) (fun i ↦ hfinite _ (hY i))
  let u := s βˆͺ (X ∩ G t)
  have hu : u ∈ U := Filter.mem_of_superset (inter_mem hX (hG t)) subset_union_right
  refine ⟨u, subset_union_left, union_subset hsX inter_subset_left, hu, ?_⟩
  apply lt_of_not_ge
  intro hr
  let i : Iic γ := ⟨ordinalRank K U F hFs u, hr⟩
  apply ht i
  apply K.mono (ordinalRank_spec K U F hFs hu)
  intro x hx
  refine ⟨hx.1.1, ?_⟩
  rintro (hxs | hxG)
  Β· exact hx.1.2.2 hxs
  Β· exact hx.2 hxG.2

include hUK hG hfinite in

lemma exists_rankModel [Countable Ξ±] [Infinite Ξ±] : βˆƒ R : RankModel Ξ±, R.ideal = K ∧ R.ultra = U := by
  classical
  obtain ⟨F, hF, hFs⟩ := exists_large_enumeration U
  refine ⟨⟨K, U, hUK, ordinalRank K U F hFs,
    ?_, ?_⟩, rfl, rfl⟩
  Β· exact fun _ _ hX hY hXY ↦ ordinalRank_antitone K U F hFs hX hY hXY
  Β· exact ordinalRank_thinning K G U hG hfinite F hF hFs

end Construction
end InfiniteMatroidCounterexample
end

end OAI