Theorem: Equiv.Perm.perm_mapsTo_inl_iff_mapsTo_inr
File: Mathlib/GroupTheory/Perm/Sign.lean

tactic: cases nonempty_fintype m
state_before: α : Type u
β : Type v
m : Type u_1
n : Type u_2
inst✝¹ : Finite m
inst✝ : Finite n
σ : Perm (m ⊕ n)
⊢ Set.MapsTo (↑σ) (Set.range Sum.inl) (Set.range Sum.inl) ↔ Set.MapsTo (↑σ) (Set.range Sum.inr) (Set.range Sum.inr)

tactic: cases nonempty_fintype n
state_before: case intro
α : Type u
β : Type v
m : Type u_1
n : Type u_2
inst✝¹ : Finite m
inst✝ : Finite n
σ : Perm (m ⊕ n)
val✝ : Fintype m
⊢ Set.MapsTo (↑σ) (Set.range Sum.inl) (Set.range Sum.inl) ↔ Set.MapsTo (↑σ) (Set.range Sum.inr) (Set.range Sum.inr)

tactic: constructor <;>
  ( intro h
    classical
      rw [← perm_inv_mapsTo_iff_mapsTo] at h
      intro x
      cases' hx : σ x with l r)
state_before: case intro.intro
α : Type u
β : Type v
m : Type u_1
n : Type u_2
inst✝¹ : Finite m
inst✝ : Finite n
σ : Perm (m ⊕ n)
val✝¹ : Fintype m
val✝ : Fintype n
⊢ Set.MapsTo (↑σ) (Set.range Sum.inl) (Set.range Sum.inl) ↔ Set.MapsTo (↑σ) (Set.range Sum.inr) (Set.range Sum.inr)

tactic: intro h
state_before: case intro.intro.mpr
α : Type u
β : Type v
m : Type u_1
n : Type u_2
inst✝¹ : Finite m
inst✝ : Finite n
σ : Perm (m ⊕ n)
val✝¹ : Fintype m
val✝ : Fintype n
⊢ Set.MapsTo (↑σ) (Set.range Sum.inr) (Set.range Sum.inr) → Set.MapsTo (↑σ) (Set.range Sum.inl) (Set.range Sum.inl)

tactic: classical
  rw [← perm_inv_mapsTo_iff_mapsTo] at h
  intro x
  cases' hx : σ x with l r
state_before: case intro.intro.mpr
α : Type u
β : Type v
m : Type u_1
n : Type u_2
inst✝¹ : Finite m
inst✝ : Finite n
σ : Perm (m ⊕ n)
val✝¹ : Fintype m
val✝ : Fintype n
h : Set.MapsTo (↑σ) (Set.range Sum.inr) (Set.range Sum.inr)
⊢ Set.MapsTo (↑σ) (Set.range Sum.inl) (Set.range Sum.inl)

tactic: rw [← perm_inv_mapsTo_iff_mapsTo] at h
state_before: case intro.intro.mpr
α : Type u
β : Type v
m : Type u_1
n : Type u_2
inst✝¹ : Finite m
inst✝ : Finite n
σ : Perm (m ⊕ n)
val✝¹ : Fintype m
val✝ : Fintype n
h : Set.MapsTo (↑σ) (Set.range Sum.inr) (Set.range Sum.inr)
⊢ Set.MapsTo (↑σ) (Set.range Sum.inl) (Set.range Sum.inl)

tactic: intro x
state_before: case intro.intro.mpr
α : Type u
β : Type v
m : Type u_1
n : Type u_2
inst✝¹ : Finite m
inst✝ : Finite n
σ : Perm (m ⊕ n)
val✝¹ : Fintype m
val✝ : Fintype n
h : Set.MapsTo (↑σ⁻¹) (Set.range Sum.inr) (Set.range Sum.inr)
⊢ Set.MapsTo (↑σ) (Set.range Sum.inl) (Set.range Sum.inl)

tactic: cases' hx : σ x with l r
state_before: case intro.intro.mpr
α : Type u
β : Type v
m : Type u_1
n : Type u_2
inst✝¹ : Finite m
inst✝ : Finite n
σ : Perm (m ⊕ n)
val✝¹ : Fintype m
val✝ : Fintype n
h : Set.MapsTo (↑σ⁻¹) (Set.range Sum.inr) (Set.range Sum.inr)
x : m ⊕ n
⊢ x ∈ Set.range Sum.inl → ↑σ x ∈ Set.range Sum.inl

tactic: rintro ⟨a, rfl⟩
state_before: case intro.intro.mp.inl
α : Type u
β : Type v
m : Type u_1
n : Type u_2
inst✝¹ : Finite m
inst✝ : Finite n
σ : Perm (m ⊕ n)
val✝¹ : Fintype m
val✝ : Fintype n
h : Set.MapsTo (↑σ⁻¹) (Set.range Sum.inl) (Set.range Sum.inl)
x : m ⊕ n
l : m
hx : ↑σ x = Sum.inl l
⊢ x ∈ Set.range Sum.inr → Sum.inl l ∈ Set.range Sum.inr

tactic: obtain ⟨y, hy⟩ := h ⟨l, rfl⟩
state_before: case intro.intro.mp.inl.intro
α : Type u
β : Type v
m : Type u_1
n : Type u_2
inst✝¹ : Finite m
inst✝ : Finite n
σ : Perm (m ⊕ n)
val✝¹ : Fintype m
val✝ : Fintype n
h : Set.MapsTo (↑σ⁻¹) (Set.range Sum.inl) (Set.range Sum.inl)
l : m
a : n
hx : ↑σ (Sum.inr a) = Sum.inl l
⊢ Sum.inl l ∈ Set.range Sum.inr

tactic: rw [← hx, σ.inv_apply_self] at hy
state_before: case intro.intro.mp.inl.intro.intro
α : Type u
β : Type v
m : Type u_1
n : Type u_2
inst✝¹ : Finite m
inst✝ : Finite n
σ : Perm (m ⊕ n)
val✝¹ : Fintype m
val✝ : Fintype n
h : Set.MapsTo (↑σ⁻¹) (Set.range Sum.inl) (Set.range Sum.inl)
l : m
a : n
hx : ↑σ (Sum.inr a) = Sum.inl l
y : m
hy : Sum.inl y = ↑σ⁻¹ (Sum.inl l)
⊢ Sum.inl l ∈ Set.range Sum.inr

tactic: exact absurd hy Sum.inl_ne_inr
state_before: case intro.intro.mp.inl.intro.intro
α : Type u
β : Type v
m : Type u_1
n : Type u_2
inst✝¹ : Finite m
inst✝ : Finite n
σ : Perm (m ⊕ n)
val✝¹ : Fintype m
val✝ : Fintype n
h : Set.MapsTo (↑σ⁻¹) (Set.range Sum.inl) (Set.range Sum.inl)
l : m
a : n
hx : ↑σ (Sum.inr a) = Sum.inl l
y : m
hy : Sum.inl y = Sum.inr a
⊢ Sum.inl l ∈ Set.range Sum.inr

tactic: rintro _
state_before: case intro.intro.mp.inr
α : Type u
β : Type v
m : Type u_1
n : Type u_2
inst✝¹ : Finite m
inst✝ : Finite n
σ : Perm (m ⊕ n)
val✝¹ : Fintype m
val✝ : Fintype n
h : Set.MapsTo (↑σ⁻¹) (Set.range Sum.inl) (Set.range Sum.inl)
x : m ⊕ n
r : n
hx : ↑σ x = Sum.inr r
⊢ x ∈ Set.range Sum.inr → Sum.inr r ∈ Set.range Sum.inr

tactic: exact ⟨r, rfl⟩
state_before: case intro.intro.mp.inr
α : Type u
β : Type v
m : Type u_1
n : Type u_2
inst✝¹ : Finite m
inst✝ : Finite n
σ : Perm (m ⊕ n)
val✝¹ : Fintype m
val✝ : Fintype n
h : Set.MapsTo (↑σ⁻¹) (Set.range Sum.inl) (Set.range Sum.inl)
x : m ⊕ n
r : n
hx : ↑σ x = Sum.inr r
a✝ : x ∈ Set.range Sum.inr
⊢ Sum.inr r ∈ Set.range Sum.inr

tactic: rintro _
state_before: case intro.intro.mpr.inl
α : Type u
β : Type v
m : Type u_1
n : Type u_2
inst✝¹ : Finite m
inst✝ : Finite n
σ : Perm (m ⊕ n)
val✝¹ : Fintype m
val✝ : Fintype n
h : Set.MapsTo (↑σ⁻¹) (Set.range Sum.inr) (Set.range Sum.inr)
x : m ⊕ n
l : m
hx : ↑σ x = Sum.inl l
⊢ x ∈ Set.range Sum.inl → Sum.inl l ∈ Set.range Sum.inl

tactic: exact ⟨l, rfl⟩
state_before: case intro.intro.mpr.inl
α : Type u
β : Type v
m : Type u_1
n : Type u_2
inst✝¹ : Finite m
inst✝ : Finite n
σ : Perm (m ⊕ n)
val✝¹ : Fintype m
val✝ : Fintype n
h : Set.MapsTo (↑σ⁻¹) (Set.range Sum.inr) (Set.range Sum.inr)
x : m ⊕ n
l : m
hx : ↑σ x = Sum.inl l
a✝ : x ∈ Set.range Sum.inl
⊢ Sum.inl l ∈ Set.range Sum.inl

tactic: rintro ⟨a, rfl⟩
state_before: case intro.intro.mpr.inr
α : Type u
β : Type v
m : Type u_1
n : Type u_2
inst✝¹ : Finite m
inst✝ : Finite n
σ : Perm (m ⊕ n)
val✝¹ : Fintype m
val✝ : Fintype n
h : Set.MapsTo (↑σ⁻¹) (Set.range Sum.inr) (Set.range Sum.inr)
x : m ⊕ n
r : n
hx : ↑σ x = Sum.inr r
⊢ x ∈ Set.range Sum.inl → Sum.inr r ∈ Set.range Sum.inl

tactic: obtain ⟨y, hy⟩ := h ⟨r, rfl⟩
state_before: case intro.intro.mpr.inr.intro
α : Type u
β : Type v
m : Type u_1
n : Type u_2
inst✝¹ : Finite m
inst✝ : Finite n
σ : Perm (m ⊕ n)
val✝¹ : Fintype m
val✝ : Fintype n
h : Set.MapsTo (↑σ⁻¹) (Set.range Sum.inr) (Set.range Sum.inr)
r : n
a : m
hx : ↑σ (Sum.inl a) = Sum.inr r
⊢ Sum.inr r ∈ Set.range Sum.inl

tactic: rw [← hx, σ.inv_apply_self] at hy
state_before: case intro.intro.mpr.inr.intro.intro
α : Type u
β : Type v
m : Type u_1
n : Type u_2
inst✝¹ : Finite m
inst✝ : Finite n
σ : Perm (m ⊕ n)
val✝¹ : Fintype m
val✝ : Fintype n
h : Set.MapsTo (↑σ⁻¹) (Set.range Sum.inr) (Set.range Sum.inr)
r : n
a : m
hx : ↑σ (Sum.inl a) = Sum.inr r
y : n
hy : Sum.inr y = ↑σ⁻¹ (Sum.inr r)
⊢ Sum.inr r ∈ Set.range Sum.inl

tactic: exact absurd hy Sum.inr_ne_inl
state_before: case intro.intro.mpr.inr.intro.intro
α : Type u
β : Type v
m : Type u_1
n : Type u_2
inst✝¹ : Finite m
inst✝ : Finite n
σ : Perm (m ⊕ n)
val✝¹ : Fintype m
val✝ : Fintype n
h : Set.MapsTo (↑σ⁻¹) (Set.range Sum.inr) (Set.range Sum.inr)
r : n
a : m
hx : ↑σ (Sum.inl a) = Sum.inr r
y : n
hy : Sum.inr y = Sum.inl a
⊢ Sum.inr r ∈ Set.range Sum.inl