l3lab/ntp-mathlib huggingface dataset:
theorem isBoundedBilinearMap_mul : IsBoundedBilinearMap 𝕜 fun p : 𝕜 × 𝕜 => p.1 * p.2 := by
  

Proof state:
𝕜 : Type u_1
inst✝⁶ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
F : Type u_3
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
G : Type u_4
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace 𝕜 G
f : E × F → G
⊢ IsBoundedBilinearMap 𝕜 fun p => p.1 * p.2

Next tactic:
simp_rw [← smul_eq_mul]
theorem isBoundedBilinearMap_mul : IsBoundedBilinearMap 𝕜 fun p : 𝕜 × 𝕜 => p.1 * p.2 := by
  simp_rw [← smul_eq_mul]
  

Proof state:
𝕜 : Type u_1
inst✝⁶ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
F : Type u_3
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
G : Type u_4
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace 𝕜 G
f : E × F → G
⊢ IsBoundedBilinearMap 𝕜 fun p => p.1 • p.2

Next tactic:
exact isBoundedBilinearMap_smul
protected theorem isOpen [CompleteSpace E] : IsOpen (range ((↑) : (E ≃L[𝕜] F) → E →L[𝕜] F)) := by
  

Proof state:
𝕜 : Type u_1
inst✝⁷ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁶ : NormedAddCommGroup E
inst✝⁵ : NormedSpace 𝕜 E
F : Type u_3
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace 𝕜 F
G : Type u_4
inst✝² : NormedAddCommGroup G
inst✝¹ : NormedSpace 𝕜 G
inst✝ : CompleteSpace E
⊢ IsOpen (range toContinuousLinearMap)

Next tactic:
rw [isOpen_iff_mem_nhds, forall_range_iff]
protected theorem isOpen [CompleteSpace E] : IsOpen (range ((↑) : (E ≃L[𝕜] F) → E →L[𝕜] F)) := by
  rw [isOpen_iff_mem_nhds, forall_range_iff]
  

Proof state:
𝕜 : Type u_1
inst✝⁷ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁶ : NormedAddCommGroup E
inst✝⁵ : NormedSpace 𝕜 E
F : Type u_3
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace 𝕜 F
G : Type u_4
inst✝² : NormedAddCommGroup G
inst✝¹ : NormedSpace 𝕜 G
inst✝ : CompleteSpace E
⊢ ∀ (i : E ≃L[𝕜] F), range toContinuousLinearMap ∈ 𝓝 ↑i

Next tactic:
refine' fun e => IsOpen.mem_nhds _ (mem_range_self _)
protected theorem isOpen [CompleteSpace E] : IsOpen (range ((↑) : (E ≃L[𝕜] F) → E →L[𝕜] F)) := by
  rw [isOpen_iff_mem_nhds, forall_range_iff]
  refine' fun e => IsOpen.mem_nhds _ (mem_range_self _)
  

Proof state:
𝕜 : Type u_1
inst✝⁷ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁶ : NormedAddCommGroup E
inst✝⁵ : NormedSpace 𝕜 E
F : Type u_3
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace 𝕜 F
G : Type u_4
inst✝² : NormedAddCommGroup G
inst✝¹ : NormedSpace 𝕜 G
inst✝ : CompleteSpace E
e : E ≃L[𝕜] F
⊢ IsOpen (range toContinuousLinearMap)

Next tactic:
let O : (E →L[𝕜] F) → E →L[𝕜] E := fun f => (e.symm : F →L[𝕜] E).comp f
protected theorem isOpen [CompleteSpace E] : IsOpen (range ((↑) : (E ≃L[𝕜] F) → E →L[𝕜] F)) := by
  rw [isOpen_iff_mem_nhds, forall_range_iff]
  refine' fun e => IsOpen.mem_nhds _ (mem_range_self _)
  let O : (E →L[𝕜] F) → E →L[𝕜] E := fun f => (e.symm : F →L[𝕜] E).comp f
  

Proof state:
𝕜 : Type u_1
inst✝⁷ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁶ : NormedAddCommGroup E
inst✝⁵ : NormedSpace 𝕜 E
F : Type u_3
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace 𝕜 F
G : Type u_4
inst✝² : NormedAddCommGroup G
inst✝¹ : NormedSpace 𝕜 G
inst✝ : CompleteSpace E
e : E ≃L[𝕜] F
O : (E →L[𝕜] F) → E →L[𝕜] E := fun f => comp (↑(ContinuousLinearEquiv.symm e)) f
⊢ IsOpen (range toContinuousLinearMap)

Next tactic:
have h_O : Continuous O := isBoundedBilinearMap_comp.continuous_right
protected theorem isOpen [CompleteSpace E] : IsOpen (range ((↑) : (E ≃L[𝕜] F) → E →L[𝕜] F)) := by
  rw [isOpen_iff_mem_nhds, forall_range_iff]
  refine' fun e => IsOpen.mem_nhds _ (mem_range_self _)
  let O : (E →L[𝕜] F) → E →L[𝕜] E := fun f => (e.symm : F →L[𝕜] E).comp f
  have h_O : Continuous O := isBoundedBilinearMap_comp.continuous_right
  

Proof state:
𝕜 : Type u_1
inst✝⁷ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁶ : NormedAddCommGroup E
inst✝⁵ : NormedSpace 𝕜 E
F : Type u_3
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace 𝕜 F
G : Type u_4
inst✝² : NormedAddCommGroup G
inst✝¹ : NormedSpace 𝕜 G
inst✝ : CompleteSpace E
e : E ≃L[𝕜] F
O : (E →L[𝕜] F) → E →L[𝕜] E := fun f => comp (↑(ContinuousLinearEquiv.symm e)) f
h_O : Continuous O
⊢ IsOpen (range toContinuousLinearMap)

Next tactic:
convert show IsOpen (O ⁻¹' { x | IsUnit x }) from Units.isOpen.preimage h_O using 1
protected theorem isOpen [CompleteSpace E] : IsOpen (range ((↑) : (E ≃L[𝕜] F) → E →L[𝕜] F)) := by
  rw [isOpen_iff_mem_nhds, forall_range_iff]
  refine' fun e => IsOpen.mem_nhds _ (mem_range_self _)
  let O : (E →L[𝕜] F) → E →L[𝕜] E := fun f => (e.symm : F →L[𝕜] E).comp f
  have h_O : Continuous O := isBoundedBilinearMap_comp.continuous_right
  convert show IsOpen (O ⁻¹' { x | IsUnit x }) from Units.isOpen.preimage h_O using 1
  

Proof state:
case h.e'_3
𝕜 : Type u_1
inst✝⁷ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁶ : NormedAddCommGroup E
inst✝⁵ : NormedSpace 𝕜 E
F : Type u_3
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace 𝕜 F
G : Type u_4
inst✝² : NormedAddCommGroup G
inst✝¹ : NormedSpace 𝕜 G
inst✝ : CompleteSpace E
e : E ≃L[𝕜] F
O : (E →L[𝕜] F) → E →L[𝕜] E := fun f => comp (↑(ContinuousLinearEquiv.symm e)) f
h_O : Continuous O
⊢ range toContinuousLinearMap = O ⁻¹' {x | IsUnit x}

Next tactic:
ext f'
protected theorem isOpen [CompleteSpace E] : IsOpen (range ((↑) : (E ≃L[𝕜] F) → E →L[𝕜] F)) := by
  rw [isOpen_iff_mem_nhds, forall_range_iff]
  refine' fun e => IsOpen.mem_nhds _ (mem_range_self _)
  let O : (E →L[𝕜] F) → E →L[𝕜] E := fun f => (e.symm : F →L[𝕜] E).comp f
  have h_O : Continuous O := isBoundedBilinearMap_comp.continuous_right
  convert show IsOpen (O ⁻¹' { x | IsUnit x }) from Units.isOpen.preimage h_O using 1
  ext f'
  

Proof state:
case h.e'_3.h
𝕜 : Type u_1
inst✝⁷ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁶ : NormedAddCommGroup E
inst✝⁵ : NormedSpace 𝕜 E
F : Type u_3
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace 𝕜 F
G : Type u_4
inst✝² : NormedAddCommGroup G
inst✝¹ : NormedSpace 𝕜 G
inst✝ : CompleteSpace E
e : E ≃L[𝕜] F
O : (E →L[𝕜] F) → E →L[𝕜] E := fun f => comp (↑(ContinuousLinearEquiv.symm e)) f
h_O : Continuous O
f' : E →L[𝕜] F
⊢ f' ∈ range toContinuousLinearMap ↔ f' ∈ O ⁻¹' {x | IsUnit x}

Next tactic:
constructor
protected theorem isOpen [CompleteSpace E] : IsOpen (range ((↑) : (E ≃L[𝕜] F) → E →L[𝕜] F)) := by
  rw [isOpen_iff_mem_nhds, forall_range_iff]
  refine' fun e => IsOpen.mem_nhds _ (mem_range_self _)
  let O : (E →L[𝕜] F) → E →L[𝕜] E := fun f => (e.symm : F →L[𝕜] E).comp f
  have h_O : Continuous O := isBoundedBilinearMap_comp.continuous_right
  convert show IsOpen (O ⁻¹' { x | IsUnit x }) from Units.isOpen.preimage h_O using 1
  ext f'
  constructor
  · 

Proof state:
case h.e'_3.h.mp
𝕜 : Type u_1
inst✝⁷ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁶ : NormedAddCommGroup E
inst✝⁵ : NormedSpace 𝕜 E
F : Type u_3
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace 𝕜 F
G : Type u_4
inst✝² : NormedAddCommGroup G
inst✝¹ : NormedSpace 𝕜 G
inst✝ : CompleteSpace E
e : E ≃L[𝕜] F
O : (E →L[𝕜] F) → E →L[𝕜] E := fun f => comp (↑(ContinuousLinearEquiv.symm e)) f
h_O : Continuous O
f' : E →L[𝕜] F
⊢ f' ∈ range toContinuousLinearMap → f' ∈ O ⁻¹' {x | IsUnit x}

Next tactic:
rintro ⟨e', rfl⟩
protected theorem isOpen [CompleteSpace E] : IsOpen (range ((↑) : (E ≃L[𝕜] F) → E →L[𝕜] F)) := by
  rw [isOpen_iff_mem_nhds, forall_range_iff]
  refine' fun e => IsOpen.mem_nhds _ (mem_range_self _)
  let O : (E →L[𝕜] F) → E →L[𝕜] E := fun f => (e.symm : F →L[𝕜] E).comp f
  have h_O : Continuous O := isBoundedBilinearMap_comp.continuous_right
  convert show IsOpen (O ⁻¹' { x | IsUnit x }) from Units.isOpen.preimage h_O using 1
  ext f'
  constructor
  · rintro ⟨e', rfl⟩
    

Proof state:
case h.e'_3.h.mp.intro
𝕜 : Type u_1
inst✝⁷ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁶ : NormedAddCommGroup E
inst✝⁵ : NormedSpace 𝕜 E
F : Type u_3
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace 𝕜 F
G : Type u_4
inst✝² : NormedAddCommGroup G
inst✝¹ : NormedSpace 𝕜 G
inst✝ : CompleteSpace E
e : E ≃L[𝕜] F
O : (E →L[𝕜] F) → E →L[𝕜] E := fun f => comp (↑(ContinuousLinearEquiv.symm e)) f
h_O : Continuous O
e' : E ≃L[𝕜] F
⊢ ↑e' ∈ O ⁻¹' {x | IsUnit x}

Next tactic:
exact ⟨(e'.trans e.symm).toUnit, rfl⟩
protected theorem isOpen [CompleteSpace E] : IsOpen (range ((↑) : (E ≃L[𝕜] F) → E →L[𝕜] F)) := by
  rw [isOpen_iff_mem_nhds, forall_range_iff]
  refine' fun e => IsOpen.mem_nhds _ (mem_range_self _)
  let O : (E →L[𝕜] F) → E →L[𝕜] E := fun f => (e.symm : F →L[𝕜] E).comp f
  have h_O : Continuous O := isBoundedBilinearMap_comp.continuous_right
  convert show IsOpen (O ⁻¹' { x | IsUnit x }) from Units.isOpen.preimage h_O using 1
  ext f'
  constructor
  · rintro ⟨e', rfl⟩
    exact ⟨(e'.trans e.symm).toUnit, rfl⟩
  · 

Proof state:
case h.e'_3.h.mpr
𝕜 : Type u_1
inst✝⁷ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁶ : NormedAddCommGroup E
inst✝⁵ : NormedSpace 𝕜 E
F : Type u_3
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace 𝕜 F
G : Type u_4
inst✝² : NormedAddCommGroup G
inst✝¹ : NormedSpace 𝕜 G
inst✝ : CompleteSpace E
e : E ≃L[𝕜] F
O : (E →L[𝕜] F) → E →L[𝕜] E := fun f => comp (↑(ContinuousLinearEquiv.symm e)) f
h_O : Continuous O
f' : E →L[𝕜] F
⊢ f' ∈ O ⁻¹' {x | IsUnit x} → f' ∈ range toContinuousLinearMap

Next tactic:
rintro ⟨w, hw⟩
protected theorem isOpen [CompleteSpace E] : IsOpen (range ((↑) : (E ≃L[𝕜] F) → E →L[𝕜] F)) := by
  rw [isOpen_iff_mem_nhds, forall_range_iff]
  refine' fun e => IsOpen.mem_nhds _ (mem_range_self _)
  let O : (E →L[𝕜] F) → E →L[𝕜] E := fun f => (e.symm : F →L[𝕜] E).comp f
  have h_O : Continuous O := isBoundedBilinearMap_comp.continuous_right
  convert show IsOpen (O ⁻¹' { x | IsUnit x }) from Units.isOpen.preimage h_O using 1
  ext f'
  constructor
  · rintro ⟨e', rfl⟩
    exact ⟨(e'.trans e.symm).toUnit, rfl⟩
  · rintro ⟨w, hw⟩
    

Proof state:
case h.e'_3.h.mpr.intro
𝕜 : Type u_1
inst✝⁷ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁶ : NormedAddCommGroup E
inst✝⁵ : NormedSpace 𝕜 E
F : Type u_3
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace 𝕜 F
G : Type u_4
inst✝² : NormedAddCommGroup G
inst✝¹ : NormedSpace 𝕜 G
inst✝ : CompleteSpace E
e : E ≃L[𝕜] F
O : (E →L[𝕜] F) → E →L[𝕜] E := fun f => comp (↑(ContinuousLinearEquiv.symm e)) f
h_O : Continuous O
f' : E →L[𝕜] F
w : (E →L[𝕜] E)ˣ
hw : ↑w = O f'
⊢ f' ∈ range toContinuousLinearMap

Next tactic:
use (unitsEquiv 𝕜 E w).trans e
protected theorem isOpen [CompleteSpace E] : IsOpen (range ((↑) : (E ≃L[𝕜] F) → E →L[𝕜] F)) := by
  rw [isOpen_iff_mem_nhds, forall_range_iff]
  refine' fun e => IsOpen.mem_nhds _ (mem_range_self _)
  let O : (E →L[𝕜] F) → E →L[𝕜] E := fun f => (e.symm : F →L[𝕜] E).comp f
  have h_O : Continuous O := isBoundedBilinearMap_comp.continuous_right
  convert show IsOpen (O ⁻¹' { x | IsUnit x }) from Units.isOpen.preimage h_O using 1
  ext f'
  constructor
  · rintro ⟨e', rfl⟩
    exact ⟨(e'.trans e.symm).toUnit, rfl⟩
  · rintro ⟨w, hw⟩
    use (unitsEquiv 𝕜 E w).trans e
    

Proof state:
case h
𝕜 : Type u_1
inst✝⁷ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁶ : NormedAddCommGroup E
inst✝⁵ : NormedSpace 𝕜 E
F : Type u_3
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace 𝕜 F
G : Type u_4
inst✝² : NormedAddCommGroup G
inst✝¹ : NormedSpace 𝕜 G
inst✝ : CompleteSpace E
e : E ≃L[𝕜] F
O : (E →L[𝕜] F) → E →L[𝕜] E := fun f => comp (↑(ContinuousLinearEquiv.symm e)) f
h_O : Continuous O
f' : E →L[𝕜] F
w : (E →L[𝕜] E)ˣ
hw : ↑w = O f'
⊢ ↑(ContinuousLinearEquiv.trans ((unitsEquiv 𝕜 E) w) e) = f'

Next tactic:
ext x
protected theorem isOpen [CompleteSpace E] : IsOpen (range ((↑) : (E ≃L[𝕜] F) → E →L[𝕜] F)) := by
  rw [isOpen_iff_mem_nhds, forall_range_iff]
  refine' fun e => IsOpen.mem_nhds _ (mem_range_self _)
  let O : (E →L[𝕜] F) → E →L[𝕜] E := fun f => (e.symm : F →L[𝕜] E).comp f
  have h_O : Continuous O := isBoundedBilinearMap_comp.continuous_right
  convert show IsOpen (O ⁻¹' { x | IsUnit x }) from Units.isOpen.preimage h_O using 1
  ext f'
  constructor
  · rintro ⟨e', rfl⟩
    exact ⟨(e'.trans e.symm).toUnit, rfl⟩
  · rintro ⟨w, hw⟩
    use (unitsEquiv 𝕜 E w).trans e
    ext x
    

Proof state:
case h.h
𝕜 : Type u_1
inst✝⁷ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁶ : NormedAddCommGroup E
inst✝⁵ : NormedSpace 𝕜 E
F : Type u_3
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace 𝕜 F
G : Type u_4
inst✝² : NormedAddCommGroup G
inst✝¹ : NormedSpace 𝕜 G
inst✝ : CompleteSpace E
e : E ≃L[𝕜] F
O : (E →L[𝕜] F) → E →L[𝕜] E := fun f => comp (↑(ContinuousLinearEquiv.symm e)) f
h_O : Continuous O
f' : E →L[𝕜] F
w : (E →L[𝕜] E)ˣ
hw : ↑w = O f'
x : E
⊢ ↑(ContinuousLinearEquiv.trans ((unitsEquiv 𝕜 E) w) e) x = f' x

Next tactic:
simp [hw]
protected theorem nhds [CompleteSpace E] (e : E ≃L[𝕜] F) :
    range ((↑) : (E ≃L[𝕜] F) → E →L[𝕜] F) ∈ 𝓝 (e : E →L[𝕜] F) :=
  IsOpen.mem_nhds ContinuousLinearEquiv.isOpen (by 

Proof state:
𝕜 : Type u_1
inst✝⁷ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁶ : NormedAddCommGroup E
inst✝⁵ : NormedSpace 𝕜 E
F : Type u_3
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace 𝕜 F
G : Type u_4
inst✝² : NormedAddCommGroup G
inst✝¹ : NormedSpace 𝕜 G
inst✝ : CompleteSpace E
e : E ≃L[𝕜] F
⊢ ↑e ∈ range toContinuousLinearMap

Next tactic:
simp
instance : SetLike YoungDiagram (ℕ × ℕ)
    where
  -- porting note: TODO: figure out how to do this correctly
  coe := fun y => y.cells
  coe_injective' μ ν h := by 

Proof state:
μ ν : YoungDiagram
h : (fun y => ↑y.cells) μ = (fun y => ↑y.cells) ν
⊢ μ = ν

Next tactic:
rwa [YoungDiagram.ext_iff, ← Finset.coe_inj]
instance : Sup YoungDiagram where
  sup μ ν :=
    { cells := μ.cells ∪ ν.cells
      isLowerSet := by
        

Proof state:
μ ν : YoungDiagram
⊢ IsLowerSet ↑(μ.cells ∪ ν.cells)

Next tactic:
rw [Finset.coe_union]
instance : Sup YoungDiagram where
  sup μ ν :=
    { cells := μ.cells ∪ ν.cells
      isLowerSet := by
        rw [Finset.coe_union]
        

Proof state:
μ ν : YoungDiagram
⊢ IsLowerSet (↑μ.cells ∪ ↑ν.cells)

Next tactic:
exact μ.isLowerSet.union ν.isLowerSet
instance : Inf YoungDiagram where
  inf μ ν :=
    { cells := μ.cells ∩ ν.cells
      isLowerSet := by
        

Proof state:
μ ν : YoungDiagram
⊢ IsLowerSet ↑(μ.cells ∩ ν.cells)

Next tactic:
rw [Finset.coe_inter]
instance : Inf YoungDiagram where
  inf μ ν :=
    { cells := μ.cells ∩ ν.cells
      isLowerSet := by
        rw [Finset.coe_inter]
        

Proof state:
μ ν : YoungDiagram
⊢ IsLowerSet (↑μ.cells ∩ ↑ν.cells)

Next tactic:
exact μ.isLowerSet.inter ν.isLowerSet
/-- The empty Young diagram is (⊥ : young_diagram). -/
instance : OrderBot YoungDiagram where
  bot :=
    { cells := ∅
      isLowerSet := by
        

Proof state:
⊢ IsLowerSet ↑∅

Next tactic:
intros a b _ h
/-- The empty Young diagram is (⊥ : young_diagram). -/
instance : OrderBot YoungDiagram where
  bot :=
    { cells := ∅
      isLowerSet := by
        intros a b _ h
        

Proof state:
a b : ℕ × ℕ
a✝ : b ≤ a
h : a ∈ ↑∅
⊢ b ∈ ↑∅

Next tactic:
simp only [Finset.coe_empty, Set.mem_empty_iff_false]
/-- The empty Young diagram is (⊥ : young_diagram). -/
instance : OrderBot YoungDiagram where
  bot :=
    { cells := ∅
      isLowerSet := by
        intros a b _ h
        simp only [Finset.coe_empty, Set.mem_empty_iff_false]
        

Proof state:
a b : ℕ × ℕ
a✝ : b ≤ a
h : a ∈ ↑∅
⊢ False

Next tactic:
simp only [Finset.coe_empty, Set.mem_empty_iff_false] at h
/-- The empty Young diagram is (⊥ : young_diagram). -/
instance : OrderBot YoungDiagram where
  bot :=
    { cells := ∅
      isLowerSet := by
        intros a b _ h
        simp only [Finset.coe_empty, Set.mem_empty_iff_false]
        simp only [Finset.coe_empty, Set.mem_empty_iff_false] at h }
  bot_le _ _ := by
    

Proof state:
x✝¹ : YoungDiagram
x✝ : ℕ × ℕ
⊢ x✝ ∈ ⊥ → x✝ ∈ x✝¹

Next tactic:
intro y
/-- The empty Young diagram is (⊥ : young_diagram). -/
instance : OrderBot YoungDiagram where
  bot :=
    { cells := ∅
      isLowerSet := by
        intros a b _ h
        simp only [Finset.coe_empty, Set.mem_empty_iff_false]
        simp only [Finset.coe_empty, Set.mem_empty_iff_false] at h }
  bot_le _ _ := by
    intro y
    

Proof state:
x✝¹ : YoungDiagram
x✝ : ℕ × ℕ
y : x✝ ∈ ⊥
⊢ x✝ ∈ x✝¹

Next tactic:
simp only [mem_mk, Finset.not_mem_empty] at y
@[norm_cast]
theorem coe_bot : (⊥ : YoungDiagram).cells = (∅ : Set (ℕ × ℕ)) := by
  

Proof state:
⊢ ↑⊥.cells = ∅

Next tactic:
refine' Set.eq_of_subset_of_subset _ _
@[norm_cast]
theorem coe_bot : (⊥ : YoungDiagram).cells = (∅ : Set (ℕ × ℕ)) := by
  refine' Set.eq_of_subset_of_subset _ _
  

Proof state:
case refine'_1
⊢ ↑⊥.cells ⊆ ∅
case refine'_2 ⊢ ∅ ⊆ ↑⊥.cells

Next tactic:
intros x h
@[norm_cast]
theorem coe_bot : (⊥ : YoungDiagram).cells = (∅ : Set (ℕ × ℕ)) := by
  refine' Set.eq_of_subset_of_subset _ _
  intros x h
  

Proof state:
case refine'_1
x : ℕ × ℕ
h : x ∈ ↑⊥.cells
⊢ x ∈ ∅
case refine'_2 ⊢ ∅ ⊆ ↑⊥.cells

Next tactic:
simp? [mem_mk, Finset.coe_empty, Set.mem_empty_iff_false] at h says
    simp only [cells_bot, Finset.coe_empty, Set.mem_empty_iff_false] at h
@[norm_cast]
theorem coe_bot : (⊥ : YoungDiagram).cells = (∅ : Set (ℕ × ℕ)) := by
  refine' Set.eq_of_subset_of_subset _ _
  intros x h
  simp? [mem_mk, Finset.coe_empty, Set.mem_empty_iff_false] at h says
    

Proof state:
case refine'_1
x : ℕ × ℕ
h : x ∈ ↑⊥.cells
⊢ x ∈ ∅
case refine'_2 ⊢ ∅ ⊆ ↑⊥.cells

Next tactic:
simp only [cells_bot, Finset.coe_empty, Set.mem_empty_iff_false] at h
@[norm_cast]
theorem coe_bot : (⊥ : YoungDiagram).cells = (∅ : Set (ℕ × ℕ)) := by
  refine' Set.eq_of_subset_of_subset _ _
  intros x h
  simp? [mem_mk, Finset.coe_empty, Set.mem_empty_iff_false] at h says
    simp only [cells_bot, Finset.coe_empty, Set.mem_empty_iff_false] at h
  

Proof state:
case refine'_2
⊢ ∅ ⊆ ↑⊥.cells

Next tactic:
simp only [cells_bot, Finset.coe_empty, Set.empty_subset]
instance : DistribLattice YoungDiagram :=
  Function.Injective.distribLattice YoungDiagram.cells (fun μ ν h => by 

Proof state:
μ ν : YoungDiagram
h : μ.cells = ν.cells
⊢ μ = ν

Next tactic:
rwa [YoungDiagram.ext_iff]
/-- The `transpose` of a Young diagram is obtained by swapping i's with j's. -/
def transpose (μ : YoungDiagram) : YoungDiagram where
  cells := (Equiv.prodComm _ _).finsetCongr μ.cells
  isLowerSet _ _ h := by
    

Proof state:
μ : YoungDiagram
x✝¹ x✝ : ℕ × ℕ
h : x✝ ≤ x✝¹
⊢ x✝¹ ∈ ↑((Equiv.finsetCongr (Equiv.prodComm ℕ ℕ)) μ.cells) → x✝ ∈ ↑((Equiv.finsetCongr (Equiv.prodComm ℕ ℕ)) μ.cells)

Next tactic:
simp only [Finset.mem_coe, Equiv.finsetCongr_apply, Finset.mem_map_equiv]
/-- The `transpose` of a Young diagram is obtained by swapping i's with j's. -/
def transpose (μ : YoungDiagram) : YoungDiagram where
  cells := (Equiv.prodComm _ _).finsetCongr μ.cells
  isLowerSet _ _ h := by
    simp only [Finset.mem_coe, Equiv.finsetCongr_apply, Finset.mem_map_equiv]
    

Proof state:
μ : YoungDiagram
x✝¹ x✝ : ℕ × ℕ
h : x✝ ≤ x✝¹
⊢ (Equiv.prodComm ℕ ℕ).symm x✝¹ ∈ μ.cells → (Equiv.prodComm ℕ ℕ).symm x✝ ∈ μ.cells

Next tactic:
intro hcell
/-- The `transpose` of a Young diagram is obtained by swapping i's with j's. -/
def transpose (μ : YoungDiagram) : YoungDiagram where
  cells := (Equiv.prodComm _ _).finsetCongr μ.cells
  isLowerSet _ _ h := by
    simp only [Finset.mem_coe, Equiv.finsetCongr_apply, Finset.mem_map_equiv]
    intro hcell
    

Proof state:
μ : YoungDiagram
x✝¹ x✝ : ℕ × ℕ
h : x✝ ≤ x✝¹
hcell : (Equiv.prodComm ℕ ℕ).symm x✝¹ ∈ μ.cells
⊢ (Equiv.prodComm ℕ ℕ).symm x✝ ∈ μ.cells

Next tactic:
apply μ.isLowerSet _ hcell
/-- The `transpose` of a Young diagram is obtained by swapping i's with j's. -/
def transpose (μ : YoungDiagram) : YoungDiagram where
  cells := (Equiv.prodComm _ _).finsetCongr μ.cells
  isLowerSet _ _ h := by
    simp only [Finset.mem_coe, Equiv.finsetCongr_apply, Finset.mem_map_equiv]
    intro hcell
    apply μ.isLowerSet _ hcell
    

Proof state:
μ : YoungDiagram
x✝¹ x✝ : ℕ × ℕ
h : x✝ ≤ x✝¹
hcell : (Equiv.prodComm ℕ ℕ).symm x✝¹ ∈ μ.cells
⊢ (Equiv.prodComm ℕ ℕ).symm x✝ ≤ (Equiv.prodComm ℕ ℕ).symm x✝¹

Next tactic:
simp [h]
@[simp]
theorem mem_transpose {μ : YoungDiagram} {c : ℕ × ℕ} : c ∈ μ.transpose ↔ c.swap ∈ μ := by
  

Proof state:
μ : YoungDiagram
c : ℕ × ℕ
⊢ c ∈ transpose μ ↔ Prod.swap c ∈ μ

Next tactic:
simp [transpose]
@[simp]
theorem transpose_transpose (μ : YoungDiagram) : μ.transpose.transpose = μ := by
  

Proof state:
μ : YoungDiagram
⊢ transpose (transpose μ) = μ

Next tactic:
ext x
@[simp]
theorem transpose_transpose (μ : YoungDiagram) : μ.transpose.transpose = μ := by
  ext x
  

Proof state:
case cells.a
μ : YoungDiagram
x : ℕ × ℕ
⊢ x ∈ (transpose (transpose μ)).cells ↔ x ∈ μ.cells

Next tactic:
simp
theorem transpose_eq_iff_eq_transpose {μ ν : YoungDiagram} : μ.transpose = ν ↔ μ = ν.transpose := by
  

Proof state:
μ ν : YoungDiagram
⊢ transpose μ = ν ↔ μ = transpose ν

Next tactic:
constructor
theorem transpose_eq_iff_eq_transpose {μ ν : YoungDiagram} : μ.transpose = ν ↔ μ = ν.transpose := by
  constructor <;>
    · 

Proof state:
case mp
μ ν : YoungDiagram
⊢ transpose μ = ν → μ = transpose ν

Next tactic:
rintro rfl
theorem transpose_eq_iff_eq_transpose {μ ν : YoungDiagram} : μ.transpose = ν ↔ μ = ν.transpose := by
  constructor <;>
    · rintro rfl
      

Proof state:
case mp
μ : YoungDiagram
⊢ μ = transpose (transpose μ)

Next tactic:
simp
theorem transpose_eq_iff_eq_transpose {μ ν : YoungDiagram} : μ.transpose = ν ↔ μ = ν.transpose := by
  constructor <;>
    · 

Proof state:
case mpr
μ ν : YoungDiagram
⊢ μ = transpose ν → transpose μ = ν

Next tactic:
rintro rfl
theorem transpose_eq_iff_eq_transpose {μ ν : YoungDiagram} : μ.transpose = ν ↔ μ = ν.transpose := by
  constructor <;>
    · rintro rfl
      

Proof state:
case mpr
ν : YoungDiagram
⊢ transpose (transpose ν) = ν

Next tactic:
simp
@[simp]
theorem transpose_eq_iff {μ ν : YoungDiagram} : μ.transpose = ν.transpose ↔ μ = ν := by
  

Proof state:
μ ν : YoungDiagram
⊢ transpose μ = transpose ν ↔ μ = ν

Next tactic:
rw [transpose_eq_iff_eq_transpose]
@[simp]
theorem transpose_eq_iff {μ ν : YoungDiagram} : μ.transpose = ν.transpose ↔ μ = ν := by
  rw [transpose_eq_iff_eq_transpose]
  

Proof state:
μ ν : YoungDiagram
⊢ μ = transpose (transpose ν) ↔ μ = ν

Next tactic:
simp
protected theorem le_of_transpose_le {μ ν : YoungDiagram} (h_le : μ.transpose ≤ ν) :
    μ ≤ ν.transpose := fun c hc => by
  

Proof state:
μ ν : YoungDiagram
h_le : transpose μ ≤ ν
c : ℕ × ℕ
hc : c ∈ μ.cells
⊢ c ∈ (transpose ν).cells

Next tactic:
simp only [mem_cells, mem_transpose]
protected theorem le_of_transpose_le {μ ν : YoungDiagram} (h_le : μ.transpose ≤ ν) :
    μ ≤ ν.transpose := fun c hc => by
  simp only [mem_cells, mem_transpose]
  

Proof state:
μ ν : YoungDiagram
h_le : transpose μ ≤ ν
c : ℕ × ℕ
hc : c ∈ μ.cells
⊢ Prod.swap c ∈ ν

Next tactic:
apply h_le
protected theorem le_of_transpose_le {μ ν : YoungDiagram} (h_le : μ.transpose ≤ ν) :
    μ ≤ ν.transpose := fun c hc => by
  simp only [mem_cells, mem_transpose]
  apply h_le
  

Proof state:
case a
μ ν : YoungDiagram
h_le : transpose μ ≤ ν
c : ℕ × ℕ
hc : c ∈ μ.cells
⊢ Prod.swap c ∈ (transpose μ).cells

Next tactic:
simpa
@[simp]
theorem transpose_le_iff {μ ν : YoungDiagram} : μ.transpose ≤ ν.transpose ↔ μ ≤ ν :=
  ⟨fun h => by
    

Proof state:
μ ν : YoungDiagram
h : transpose μ ≤ transpose ν
⊢ μ ≤ ν

Next tactic:
convert YoungDiagram.le_of_transpose_le h
@[simp]
theorem transpose_le_iff {μ ν : YoungDiagram} : μ.transpose ≤ ν.transpose ↔ μ ≤ ν :=
  ⟨fun h => by
    convert YoungDiagram.le_of_transpose_le h
    

Proof state:
case h.e'_4
μ ν : YoungDiagram
h : transpose μ ≤ transpose ν
⊢ ν = transpose (transpose ν)

Next tactic:
simp
@[simp]
theorem transpose_le_iff {μ ν : YoungDiagram} : μ.transpose ≤ ν.transpose ↔ μ ≤ ν :=
  ⟨fun h => by
    convert YoungDiagram.le_of_transpose_le h
    simp, fun h => by
    

Proof state:
μ ν : YoungDiagram
h : μ ≤ ν
⊢ transpose μ ≤ transpose ν

Next tactic:
rw [← transpose_transpose μ] at h
@[simp]
theorem transpose_le_iff {μ ν : YoungDiagram} : μ.transpose ≤ ν.transpose ↔ μ ≤ ν :=
  ⟨fun h => by
    convert YoungDiagram.le_of_transpose_le h
    simp, fun h => by
    rw [← transpose_transpose μ] at h
    

Proof state:
μ ν : YoungDiagram
h : transpose (transpose μ) ≤ ν
⊢ transpose μ ≤ transpose ν

Next tactic:
exact YoungDiagram.le_of_transpose_le h
/-- Transposing Young diagrams is an `OrderIso`. -/
@[simps]
def transposeOrderIso : YoungDiagram ≃o YoungDiagram :=
  ⟨⟨transpose, transpose, fun _ => by 

Proof state:
x✝ : YoungDiagram
⊢ transpose (transpose x✝) = x✝

Next tactic:
simp