Theorem: Cardinal.mk_perm_eq_self_power
File: Mathlib/SetTheory/Cardinal/Ordinal.lean

tactic: suffices Nonempty ((α → Bool) ↪ Equiv.Perm (α × Bool)) by
  obtain ⟨e⟩ : Nonempty (α ≃ α × Bool) := by
    erw [← Cardinal.eq, mk_prod, lift_uzero, mk_bool,
      lift_natCast, mul_two, add_eq_self (aleph0_le_mk α)]
  erw [← le_def, mk_arrow, lift_uzero, mk_bool, lift_natCast 2] at this
  rwa [← power_def, power_self_eq (aleph0_le_mk α), e.permCongr.cardinal_eq]
state_before: α β : Type u
β' : Type v
inst✝ : Infinite α
⊢ #(α → α) ≤ #(α ≃ α)
state_after: α β : Type u
β' : Type v
inst✝ : Infinite α
⊢ Nonempty ((α → Bool) ↪ Perm (α × Bool))

tactic: refine ⟨⟨fun f ↦ Involutive.toPerm (fun x ↦ ⟨x.1, xor (f x.1) x.2⟩) fun x ↦ ?_, fun f g h ↦ ?_⟩⟩
state_before: α β : Type u
β' : Type v
inst✝ : Infinite α
⊢ Nonempty ((α → Bool) ↪ Perm (α × Bool))
state_after: case refine_1
α β : Type u
β' : Type v
inst✝ : Infinite α
f : α → Bool
x : α × Bool
⊢ (fun x => (x.1, xor (f x.1) x.2)) ((fun x => (x.1, xor (f x.1) x.2)) x) = x

case refine_2
α β : Type u
β' : Type v
inst✝ : Infinite α
f g : α → Bool
h :
  (fun f => Involutive.toPerm (fun x => (x.1, xor (f x.1) x.2)) ⋯) f =
    (fun f => Involutive.toPerm (fun x => (x.1, xor (f x.1) x.2)) ⋯) g
⊢ f = g

tactic: obtain ⟨e⟩ : Nonempty (α ≃ α × Bool) := by
  erw [← Cardinal.eq, mk_prod, lift_uzero, mk_bool,
    lift_natCast, mul_two, add_eq_self (aleph0_le_mk α)]
state_before: α β : Type u
β' : Type v
inst✝ : Infinite α
this : Nonempty ((α → Bool) ↪ Perm (α × Bool))
⊢ #(α → α) ≤ #(α ≃ α)
state_after: case intro
α β : Type u
β' : Type v
inst✝ : Infinite α
this : Nonempty ((α → Bool) ↪ Perm (α × Bool))
e : α ≃ α × Bool
⊢ #(α → α) ≤ #(α ≃ α)

tactic: erw [← le_def, mk_arrow, lift_uzero, mk_bool, lift_natCast 2] at this
state_before: case intro
α β : Type u
β' : Type v
inst✝ : Infinite α
this : Nonempty ((α → Bool) ↪ Perm (α × Bool))
e : α ≃ α × Bool
⊢ #(α → α) ≤ #(α ≃ α)
state_after: case intro
α β : Type u
β' : Type v
inst✝ : Infinite α
this : ↑2 ^ #α ≤ #(Perm (α × Bool))
e : α ≃ α × Bool
⊢ #(α → α) ≤ #(α ≃ α)

tactic: rwa [← power_def, power_self_eq (aleph0_le_mk α), e.permCongr.cardinal_eq]
state_before: case intro
α β : Type u
β' : Type v
inst✝ : Infinite α
this : ↑2 ^ #α ≤ #(Perm (α × Bool))
e : α ≃ α × Bool
⊢ #(α → α) ≤ #(α ≃ α)
state_after: no goals

tactic: erw [← Cardinal.eq, mk_prod, lift_uzero, mk_bool,
  lift_natCast, mul_two, add_eq_self (aleph0_le_mk α)]
state_before: α β : Type u
β' : Type v
inst✝ : Infinite α
this : Nonempty ((α → Bool) ↪ Perm (α × Bool))
⊢ Nonempty (α ≃ α × Bool)
state_after: no goals

tactic: simp_rw [← Bool.xor_assoc, Bool.xor_self, Bool.false_xor]
state_before: case refine_1
α β : Type u
β' : Type v
inst✝ : Infinite α
f : α → Bool
x : α × Bool
⊢ (fun x => (x.1, xor (f x.1) x.2)) ((fun x => (x.1, xor (f x.1) x.2)) x) = x
state_after: no goals

tactic: ext a
state_before: case refine_2
α β : Type u
β' : Type v
inst✝ : Infinite α
f g : α → Bool
h :
  (fun f => Involutive.toPerm (fun x => (x.1, xor (f x.1) x.2)) ⋯) f =
    (fun f => Involutive.toPerm (fun x => (x.1, xor (f x.1) x.2)) ⋯) g
⊢ f = g
state_after: case refine_2.h
α β : Type u
β' : Type v
inst✝ : Infinite α
f g : α → Bool
h :
  (fun f => Involutive.toPerm (fun x => (x.1, xor (f x.1) x.2)) ⋯) f =
    (fun f => Involutive.toPerm (fun x => (x.1, xor (f x.1) x.2)) ⋯) g
a : α
⊢ f a = g a

tactic: rw [← (f a).xor_false, ← (g a).xor_false]
state_before: case refine_2.h
α β : Type u
β' : Type v
inst✝ : Infinite α
f g : α → Bool
h :
  (fun f => Involutive.toPerm (fun x => (x.1, xor (f x.1) x.2)) ⋯) f =
    (fun f => Involutive.toPerm (fun x => (x.1, xor (f x.1) x.2)) ⋯) g
a : α
⊢ f a = g a
state_after: case refine_2.h
α β : Type u
β' : Type v
inst✝ : Infinite α
f g : α → Bool
h :
  (fun f => Involutive.toPerm (fun x => (x.1, xor (f x.1) x.2)) ⋯) f =
    (fun f => Involutive.toPerm (fun x => (x.1, xor (f x.1) x.2)) ⋯) g
a : α
⊢ xor (f a) false = xor (g a) false

tactic: exact congr(($h ⟨a, false⟩).2)
state_before: case refine_2.h
α β : Type u
β' : Type v
inst✝ : Infinite α
f g : α → Bool
h :
  (fun f => Involutive.toPerm (fun x => (x.1, xor (f x.1) x.2)) ⋯) f =
    (fun f => Involutive.toPerm (fun x => (x.1, xor (f x.1) x.2)) ⋯) g
a : α
⊢ xor (f a) false = xor (g a) false
state_after: no goals