Theorem: Profinite.NobelingProof.swapTrue_mem_C1
File: Mathlib/Topology/Category/Profinite/Nobeling.lean

tactic: obtain ⟨f, g, hg, rfl⟩ := f
state_before: I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
o : Ordinal.{u}
hC : IsClosed C
hsC : contained C (Order.succ o)
ho : o < Ordinal.type fun x x_1 => x < x_1
f : ↑(π (C1 C ho) fun x => ord I x < o)
⊢ SwapTrue o ↑f ∈ C1 C ho
state_after: case mk.intro.intro
I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
o : Ordinal.{u}
hC : IsClosed C
hsC : contained C (Order.succ o)
ho : o < Ordinal.type fun x x_1 => x < x_1
g : I → Bool
hg : g ∈ C1 C ho
⊢ SwapTrue o ↑⟨Proj (fun x => ord I x < o) g, ⋯⟩ ∈ C1 C ho

tactic: convert hg
state_before: case mk.intro.intro
I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
o : Ordinal.{u}
hC : IsClosed C
hsC : contained C (Order.succ o)
ho : o < Ordinal.type fun x x_1 => x < x_1
g : I → Bool
hg : g ∈ C1 C ho
⊢ SwapTrue o ↑⟨Proj (fun x => ord I x < o) g, ⋯⟩ ∈ C1 C ho
state_after: case h.e'_4
I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
o : Ordinal.{u}
hC : IsClosed C
hsC : contained C (Order.succ o)
ho : o < Ordinal.type fun x x_1 => x < x_1
g : I → Bool
hg : g ∈ C1 C ho
⊢ SwapTrue o ↑⟨Proj (fun x => ord I x < o) g, ⋯⟩ = g

tactic: dsimp (config := { unfoldPartialApp := true }) [SwapTrue]
state_before: case h.e'_4
I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
o : Ordinal.{u}
hC : IsClosed C
hsC : contained C (Order.succ o)
ho : o < Ordinal.type fun x x_1 => x < x_1
g : I → Bool
hg : g ∈ C1 C ho
⊢ SwapTrue o ↑⟨Proj (fun x => ord I x < o) g, ⋯⟩ = g
state_after: case h.e'_4
I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
o : Ordinal.{u}
hC : IsClosed C
hsC : contained C (Order.succ o)
ho : o < Ordinal.type fun x x_1 => x < x_1
g : I → Bool
hg : g ∈ C1 C ho
⊢ (fun i => if ord I i = o then true else Proj (fun x => ord I x < o) g i) = g

tactic: ext i
state_before: case h.e'_4
I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
o : Ordinal.{u}
hC : IsClosed C
hsC : contained C (Order.succ o)
ho : o < Ordinal.type fun x x_1 => x < x_1
g : I → Bool
hg : g ∈ C1 C ho
⊢ (fun i => if ord I i = o then true else Proj (fun x => ord I x < o) g i) = g
state_after: case h.e'_4.h
I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
o : Ordinal.{u}
hC : IsClosed C
hsC : contained C (Order.succ o)
ho : o < Ordinal.type fun x x_1 => x < x_1
g : I → Bool
hg : g ∈ C1 C ho
i : I
⊢ (if ord I i = o then true else Proj (fun x => ord I x < o) g i) = g i

tactic: split_ifs with h
state_before: case h.e'_4.h
I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
o : Ordinal.{u}
hC : IsClosed C
hsC : contained C (Order.succ o)
ho : o < Ordinal.type fun x x_1 => x < x_1
g : I → Bool
hg : g ∈ C1 C ho
i : I
⊢ (if ord I i = o then true else Proj (fun x => ord I x < o) g i) = g i
state_after: case pos
I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
o : Ordinal.{u}
hC : IsClosed C
hsC : contained C (Order.succ o)
ho : o < Ordinal.type fun x x_1 => x < x_1
g : I → Bool
hg : g ∈ C1 C ho
i : I
h : ord I i = o
⊢ true = g i

case neg
I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
o : Ordinal.{u}
hC : IsClosed C
hsC : contained C (Order.succ o)
ho : o < Ordinal.type fun x x_1 => x < x_1
g : I → Bool
hg : g ∈ C1 C ho
i : I
h : ¬ord I i = o
⊢ Proj (fun x => ord I x < o) g i = g i

tactic: rw [ord_term ho] at h
state_before: case pos
I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
o : Ordinal.{u}
hC : IsClosed C
hsC : contained C (Order.succ o)
ho : o < Ordinal.type fun x x_1 => x < x_1
g : I → Bool
hg : g ∈ C1 C ho
i : I
h : ord I i = o
⊢ true = g i
state_after: case pos
I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
o : Ordinal.{u}
hC : IsClosed C
hsC : contained C (Order.succ o)
ho : o < Ordinal.type fun x x_1 => x < x_1
g : I → Bool
hg : g ∈ C1 C ho
i : I
h : term I ho = i
⊢ true = g i

tactic: simpa only [← h] using hg.2.symm
state_before: case pos
I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
o : Ordinal.{u}
hC : IsClosed C
hsC : contained C (Order.succ o)
ho : o < Ordinal.type fun x x_1 => x < x_1
g : I → Bool
hg : g ∈ C1 C ho
i : I
h : term I ho = i
⊢ true = g i
state_after: no goals

tactic: simp only [Proj, ite_eq_left_iff, not_lt, @eq_comm _ false, ← Bool.not_eq_true]
state_before: case neg
I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
o : Ordinal.{u}
hC : IsClosed C
hsC : contained C (Order.succ o)
ho : o < Ordinal.type fun x x_1 => x < x_1
g : I → Bool
hg : g ∈ C1 C ho
i : I
h : ¬ord I i = o
⊢ Proj (fun x => ord I x < o) g i = g i
state_after: case neg
I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
o : Ordinal.{u}
hC : IsClosed C
hsC : contained C (Order.succ o)
ho : o < Ordinal.type fun x x_1 => x < x_1
g : I → Bool
hg : g ∈ C1 C ho
i : I
h : ¬ord I i = o
⊢ o ≤ ord I i → ¬g i = true

tactic: specialize hsC g hg.1 i
state_before: case neg
I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
o : Ordinal.{u}
hC : IsClosed C
hsC : contained C (Order.succ o)
ho : o < Ordinal.type fun x x_1 => x < x_1
g : I → Bool
hg : g ∈ C1 C ho
i : I
h : ¬ord I i = o
⊢ o ≤ ord I i → ¬g i = true
state_after: case neg
I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
o : Ordinal.{u}
hC : IsClosed C
ho : o < Ordinal.type fun x x_1 => x < x_1
g : I → Bool
hg : g ∈ C1 C ho
i : I
h : ¬ord I i = o
hsC : g i = true → ord I i < Order.succ o
⊢ o ≤ ord I i → ¬g i = true

tactic: intro h'
state_before: case neg
I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
o : Ordinal.{u}
hC : IsClosed C
ho : o < Ordinal.type fun x x_1 => x < x_1
g : I → Bool
hg : g ∈ C1 C ho
i : I
h : ¬ord I i = o
hsC : g i = true → ord I i < Order.succ o
⊢ o ≤ ord I i → ¬g i = true
state_after: case neg
I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
o : Ordinal.{u}
hC : IsClosed C
ho : o < Ordinal.type fun x x_1 => x < x_1
g : I → Bool
hg : g ∈ C1 C ho
i : I
h : ¬ord I i = o
hsC : g i = true → ord I i < Order.succ o
h' : o ≤ ord I i
⊢ ¬g i = true

tactic: contrapose! hsC
state_before: case neg
I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
o : Ordinal.{u}
hC : IsClosed C
ho : o < Ordinal.type fun x x_1 => x < x_1
g : I → Bool
hg : g ∈ C1 C ho
i : I
h : ¬ord I i = o
hsC : g i = true → ord I i < Order.succ o
h' : o ≤ ord I i
⊢ ¬g i = true
state_after: case neg
I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
o : Ordinal.{u}
hC : IsClosed C
ho : o < Ordinal.type fun x x_1 => x < x_1
g : I → Bool
hg : g ∈ C1 C ho
i : I
h : ¬ord I i = o
h' : o ≤ ord I i
hsC : g i = true
⊢ g i = true ∧ Order.succ o ≤ ord I i

tactic: exact ⟨hsC, Order.succ_le_of_lt (h'.lt_of_ne' h)⟩
state_before: case neg
I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
o : Ordinal.{u}
hC : IsClosed C
ho : o < Ordinal.type fun x x_1 => x < x_1
g : I → Bool
hg : g ∈ C1 C ho
i : I
h : ¬ord I i = o
h' : o ≤ ord I i
hsC : g i = true
⊢ g i = true ∧ Order.succ o ≤ ord I i
state_after: no goals