privatetheoremrow_action_iff (t t' : TupleM.I) (n n' : ℕ) (s u s' : FinsetM.B) :
(Tuples.map f.index t' = Tuples.map f.index t ∧ n' = n ∧
f.rowShift t' n' ∆ s'.map f.base.toEmbedding =
(f.rowShift t n ∆ s.map f.base.toEmbedding) ∆ u.map f.base.toEmbedding) ↔
(t' = t ∧ n' = n ∧ s' = s ∆ u) :=by
proof · 8
lines
rw [Tuples.map_eq_iff]
constructor
· rintro ⟨rfl, rfl, h⟩
refine ⟨rfl, rfl, ?_⟩
rw [symmDiff_assoc, ←FiniteSupports.map_symmDiff, symmDiff_right_inj] at h
exact Finset.map_injective _ h
· rintro ⟨rfl, rfl, rfl⟩
exact ⟨rfl, rfl, by rw [FiniteSupports.map_symmDiff, symmDiff_assoc]⟩
privatetheoremcol_action_iff (t t' : TupleM.I) (b b' : M.B) (v u v' : Finsetℕ) :
(Tuples.map f.index t' = Tuples.map f.index t ∧ f.base b' = f.base b ∧
f.colShift t' b' ∆ v' = (f.colShift t b ∆ v) ∆ u) ↔
(t' = t ∧ b' = b ∧ v' = v ∆ u) :=by
privatetheorembit_relation_iff (t t' : TupleM.I) (n : ℕ) (b : M.B)
(s : FinsetM.B) (v : Finsetℕ) :
(Tuples.map f.index t = Tuples.map f.index t' ∧Matrix.bit (N.bits (Tuples.map f.index t)) n
(f.rowShift t n ∆ s.map f.base.toEmbedding) (f.base b) (f.colShift t' b ∆ v) = true) ↔
(t = t' ∧Matrix.bit (M.bits t) n s b v = true) :=by
proof · 6
lines
rw [Tuples.map_eq_iff]
constructor
· rintro ⟨rfl, hb⟩
exact ⟨rfl, by simpa only [f.bit_all] using hb⟩
· rintro ⟨rfl, hb⟩
exact ⟨rfl, by simpa only [f.bit_all] using hb⟩
rcases xs with _ | ⟨x, xs⟩
· simp
rcases xs with _ | ⟨y, xs⟩
· cases x <;> simp
rcases xs with _ | ⟨z, xs⟩
· cases x <;> cases y <;> simp
rcases xs with _ | ⟨q, qs⟩
· cases x <;> cases y <;> cases z <;> simp
· cases x <;> cases y <;> cases z <;> simp
rcases xs with _ | ⟨x, xs⟩
· simp
rcases xs with _ | ⟨y, xs⟩
· cases x <;> simp
rcases xs with _ | ⟨z, xs⟩
· cases x <;> cases y <;> simp
rcases xs with _ | ⟨q, qs⟩
· cases x <;> cases y <;> cases z <;> simp
· cases x <;> cases y <;> cases z <;> simp
rcases xs with _ | ⟨x, xs⟩
· simp
rcases xs with _ | ⟨y, ys⟩
· cases x <;> simp
cases x <;> simp
intro _
exact and_congr (base_point_eq_iff f y _) (by
simpa only [Tuples.map, List.ofFn_succ] using tuple_list_eq_iff f _ ys)
theoremMap.rawRel (s : Symbol) (xs : ListM.Carrier) :
N.rawRel s (xs.map f.onPoint) ↔M.rawRel s xs :=by
proof · 17
lines
cases s with
| index => exact raw_map_index f xs
| base => exact raw_map_base f xs
| group => exact raw_map_group f xs
| star => exact raw_map_star f xs
| row k n => exact raw_map_row f k n xs
| col k => exact raw_map_col f k xs
| label v => exact raw_map_label f v xs
| rowProjection k n => exact raw_map_rowProjection f k n xs
| colProjection k => exact raw_map_colProjection f k xs
| order => exact raw_map_order f xs
| incidence => exact raw_map_incidence f xs
| bit => exact raw_map_bit f xs
| groupAdd => exact raw_map_groupAdd f xs
| starAdd => exact raw_map_starAdd f xs
| rowAct => exact raw_map_rowAct f xs
| colAct => exact raw_map_colAct f xs
index :=Function.Embedding.refl _
base := (OrderIso.refl _).toOrderEmbedding
rowShift _ _ := ∅
colShift _ _ := ∅
bit_agrees t n b :=by simp [Matrix.bit]
index := f.index.trans g.index
base := f.base.trans g.base
rowShift t n := g.rowShift (Tuples.map f.index t) n ∆
(f.rowShift t n).map g.base.toEmbedding
colShift t b := g.colShift (Tuples.map f.index t) (f.base b) ∆ f.colShift t b
bit_agrees t n b :=by
exact (g.bit_all (Tuples.map f.index t) n (f.rowShift t n) (f.base b)
(f.colShift t b)).trans (f.bit_agrees t n b)
theoremMap.ext_onPoint {f g : MapMN} (h : ∀ x, f.onPoint x = g.onPoint x) : f = g :=by
proof · 21
lines
havehi : f.index = g.index :=by
ext i
exact Point.index.inj (h (.index i))
havehb : f.base = g.base :=by
ext b
exact Point.base.inj (h (.base b))
havehr : f.rowShift = g.rowShift :=by
funext t n
have he := (Point.row.inj (h (.row t n ∅))).2.2
simpa using he
havehc : f.colShift = g.colShift :=by
funext t b
have he := (Point.col.inj (h (.col t b ∅))).2.2
simpa using he
cases f
cases g
cases hi
cases hb
cases hr
cases hc
rfl