l3lab/ntp-mathlib huggingface dataset:
/-- Under the AKLB setting, `Iᵛ := traceDual A K (I : Submodule B L)` is the
`Submodule B L` such that `x ∈ Iᵛ ↔ ∀ y ∈ I, Tr(x, y) ∈ A` -/
noncomputable
def Submodule.traceDual (I : Submodule B L) : Submodule B L where
  __ := (traceForm K L).dualSubmodule (I.restrictScalars A)
  smul_mem' c x hx a ha := by
    

Proof state:
A : Type u_1
K : Type u_2
L : Type u
B : Type ?u.8247
inst✝¹⁷ : CommRing A
inst✝¹⁶ : Field K
inst✝¹⁵ : CommRing B
inst✝¹⁴ : Field L
inst✝¹³ : Algebra A K
inst✝¹² : Algebra B L
inst✝¹¹ : Algebra A B
inst✝¹⁰ : Algebra K L
inst✝⁹ : Algebra A L
inst✝⁸ : IsScalarTower A K L
inst✝⁷ : IsScalarTower A B L
inst✝⁶ : IsDomain A
inst✝⁵ : IsDomain B
inst✝⁴ : IsFractionRing A K
inst✝³ : IsIntegralClosure B A L
inst✝² : IsFractionRing B L
inst✝¹ : FiniteDimensional K L
inst✝ : IsSeparable K L
I : Submodule B L
src✝ : Submodule A L := BilinForm.dualSubmodule (traceForm K L) (restrictScalars A I)
c : B
x : L
hx : x ∈ src✝.carrier
a : L
ha : a ∈ restrictScalars A I
⊢ BilinForm.bilin (traceForm K L) (c • x) a ∈ 1

Next tactic:
rw [traceForm_apply, smul_mul_assoc, mul_comm, ← smul_mul_assoc, mul_comm]
/-- Under the AKLB setting, `Iᵛ := traceDual A K (I : Submodule B L)` is the
`Submodule B L` such that `x ∈ Iᵛ ↔ ∀ y ∈ I, Tr(x, y) ∈ A` -/
noncomputable
def Submodule.traceDual (I : Submodule B L) : Submodule B L where
  __ := (traceForm K L).dualSubmodule (I.restrictScalars A)
  smul_mem' c x hx a ha := by
    rw [traceForm_apply, smul_mul_assoc, mul_comm, ← smul_mul_assoc, mul_comm]
    

Proof state:
A : Type u_1
K : Type u_2
L : Type u
B : Type ?u.8247
inst✝¹⁷ : CommRing A
inst✝¹⁶ : Field K
inst✝¹⁵ : CommRing B
inst✝¹⁴ : Field L
inst✝¹³ : Algebra A K
inst✝¹² : Algebra B L
inst✝¹¹ : Algebra A B
inst✝¹⁰ : Algebra K L
inst✝⁹ : Algebra A L
inst✝⁸ : IsScalarTower A K L
inst✝⁷ : IsScalarTower A B L
inst✝⁶ : IsDomain A
inst✝⁵ : IsDomain B
inst✝⁴ : IsFractionRing A K
inst✝³ : IsIntegralClosure B A L
inst✝² : IsFractionRing B L
inst✝¹ : FiniteDimensional K L
inst✝ : IsSeparable K L
I : Submodule B L
src✝ : Submodule A L := BilinForm.dualSubmodule (traceForm K L) (restrictScalars A I)
c : B
x : L
hx : x ∈ src✝.carrier
a : L
ha : a ∈ restrictScalars A I
⊢ (Algebra.trace K L) (x * c • a) ∈ 1

Next tactic:
exact hx _ (Submodule.smul_mem _ c ha)
lemma le_traceDual_iff_map_le_one {I J : Submodule B L} :
    I ≤ Jᵛ ↔ ((I * J : Submodule B L).restrictScalars A).map
      ((trace K L).restrictScalars A) ≤ 1 := by
  

Proof state:
A : Type u_1
K : Type u_2
L : Type u
B : Type u_3
inst✝¹⁷ : CommRing A
inst✝¹⁶ : Field K
inst✝¹⁵ : CommRing B
inst✝¹⁴ : Field L
inst✝¹³ : Algebra A K
inst✝¹² : Algebra B L
inst✝¹¹ : Algebra A B
inst✝¹⁰ : Algebra K L
inst✝⁹ : Algebra A L
inst✝⁸ : IsScalarTower A K L
inst✝⁷ : IsScalarTower A B L
inst✝⁶ : IsDomain A
inst✝⁵ : IsDomain B
inst✝⁴ : IsFractionRing A K
inst✝³ : IsIntegralClosure B A L
inst✝² : IsFractionRing B L
inst✝¹ : FiniteDimensional K L
inst✝ : IsSeparable K L
I J : Submodule B L
⊢ I ≤ Jᵛ ↔ map (↑A (Algebra.trace K L)) (restrictScalars A (I * J)) ≤ 1

Next tactic:
rw [Submodule.map_le_iff_le_comap, Submodule.restrictScalars_mul, Submodule.mul_le]
lemma le_traceDual_iff_map_le_one {I J : Submodule B L} :
    I ≤ Jᵛ ↔ ((I * J : Submodule B L).restrictScalars A).map
      ((trace K L).restrictScalars A) ≤ 1 := by
  rw [Submodule.map_le_iff_le_comap, Submodule.restrictScalars_mul, Submodule.mul_le]
  

Proof state:
A : Type u_1
K : Type u_2
L : Type u
B : Type u_3
inst✝¹⁷ : CommRing A
inst✝¹⁶ : Field K
inst✝¹⁵ : CommRing B
inst✝¹⁴ : Field L
inst✝¹³ : Algebra A K
inst✝¹² : Algebra B L
inst✝¹¹ : Algebra A B
inst✝¹⁰ : Algebra K L
inst✝⁹ : Algebra A L
inst✝⁸ : IsScalarTower A K L
inst✝⁷ : IsScalarTower A B L
inst✝⁶ : IsDomain A
inst✝⁵ : IsDomain B
inst✝⁴ : IsFractionRing A K
inst✝³ : IsIntegralClosure B A L
inst✝² : IsFractionRing B L
inst✝¹ : FiniteDimensional K L
inst✝ : IsSeparable K L
I J : Submodule B L
⊢ I ≤ Jᵛ ↔ ∀ m ∈ restrictScalars A I, ∀ n ∈ restrictScalars A J, m * n ∈ comap (↑A (Algebra.trace K L)) 1

Next tactic:
simp [SetLike.le_def, mem_traceDual]
lemma le_traceDual_mul_iff {I J J' : Submodule B L} :
    I ≤ (J * J')ᵛ ↔ I * J ≤ J'ᵛ := by
  

Proof state:
A : Type u_1
K : Type u_2
L : Type u
B : Type u_3
inst✝¹⁷ : CommRing A
inst✝¹⁶ : Field K
inst✝¹⁵ : CommRing B
inst✝¹⁴ : Field L
inst✝¹³ : Algebra A K
inst✝¹² : Algebra B L
inst✝¹¹ : Algebra A B
inst✝¹⁰ : Algebra K L
inst✝⁹ : Algebra A L
inst✝⁸ : IsScalarTower A K L
inst✝⁷ : IsScalarTower A B L
inst✝⁶ : IsDomain A
inst✝⁵ : IsDomain B
inst✝⁴ : IsFractionRing A K
inst✝³ : IsIntegralClosure B A L
inst✝² : IsFractionRing B L
inst✝¹ : FiniteDimensional K L
inst✝ : IsSeparable K L
I J J' : Submodule B L
⊢ I ≤ (J * J')ᵛ ↔ I * J ≤ J'ᵛ

Next tactic:
simp_rw [le_traceDual_iff_map_le_one, mul_assoc]
lemma le_traceDual {I J : Submodule B L} :
    I ≤ Jᵛ ↔ I * J ≤ 1ᵛ := by
  

Proof state:
A : Type u_1
K : Type u_2
L : Type u
B : Type u_3
inst✝¹⁷ : CommRing A
inst✝¹⁶ : Field K
inst✝¹⁵ : CommRing B
inst✝¹⁴ : Field L
inst✝¹³ : Algebra A K
inst✝¹² : Algebra B L
inst✝¹¹ : Algebra A B
inst✝¹⁰ : Algebra K L
inst✝⁹ : Algebra A L
inst✝⁸ : IsScalarTower A K L
inst✝⁷ : IsScalarTower A B L
inst✝⁶ : IsDomain A
inst✝⁵ : IsDomain B
inst✝⁴ : IsFractionRing A K
inst✝³ : IsIntegralClosure B A L
inst✝² : IsFractionRing B L
inst✝¹ : FiniteDimensional K L
inst✝ : IsSeparable K L
I J : Submodule B L
⊢ I ≤ Jᵛ ↔ I * J ≤ 1ᵛ

Next tactic:
rw [← le_traceDual_mul_iff, mul_one]
lemma le_traceDual_comm {I J : Submodule B L} :
    I ≤ Jᵛ ↔ J ≤ Iᵛ := by 

Proof state:
A : Type u_1
K : Type u_2
L : Type u
B : Type u_3
inst✝¹⁷ : CommRing A
inst✝¹⁶ : Field K
inst✝¹⁵ : CommRing B
inst✝¹⁴ : Field L
inst✝¹³ : Algebra A K
inst✝¹² : Algebra B L
inst✝¹¹ : Algebra A B
inst✝¹⁰ : Algebra K L
inst✝⁹ : Algebra A L
inst✝⁸ : IsScalarTower A K L
inst✝⁷ : IsScalarTower A B L
inst✝⁶ : IsDomain A
inst✝⁵ : IsDomain B
inst✝⁴ : IsFractionRing A K
inst✝³ : IsIntegralClosure B A L
inst✝² : IsFractionRing B L
inst✝¹ : FiniteDimensional K L
inst✝ : IsSeparable K L
I J : Submodule B L
⊢ I ≤ Jᵛ ↔ J ≤ Iᵛ

Next tactic:
rw [le_traceDual, mul_comm, ← le_traceDual]
@[simp]
lemma traceDual_bot :
    (⊥ : Submodule B L)ᵛ = ⊤ := by 

Proof state:
A : Type u_1
K : Type u_2
L : Type u
B : Type u_3
inst✝¹⁷ : CommRing A
inst✝¹⁶ : Field K
inst✝¹⁵ : CommRing B
inst✝¹⁴ : Field L
inst✝¹³ : Algebra A K
inst✝¹² : Algebra B L
inst✝¹¹ : Algebra A B
inst✝¹⁰ : Algebra K L
inst✝⁹ : Algebra A L
inst✝⁸ : IsScalarTower A K L
inst✝⁷ : IsScalarTower A B L
inst✝⁶ : IsDomain A
inst✝⁵ : IsDomain B
inst✝⁴ : IsFractionRing A K
inst✝³ : IsIntegralClosure B A L
inst✝² : IsFractionRing B L
inst✝¹ : FiniteDimensional K L
inst✝ : IsSeparable K L
⊢ ⊥ᵛ = ⊤

Next tactic:
ext
@[simp]
lemma traceDual_bot :
    (⊥ : Submodule B L)ᵛ = ⊤ := by ext; 

Proof state:
case h
A : Type u_1
K : Type u_2
L : Type u
B : Type u_3
inst✝¹⁷ : CommRing A
inst✝¹⁶ : Field K
inst✝¹⁵ : CommRing B
inst✝¹⁴ : Field L
inst✝¹³ : Algebra A K
inst✝¹² : Algebra B L
inst✝¹¹ : Algebra A B
inst✝¹⁰ : Algebra K L
inst✝⁹ : Algebra A L
inst✝⁸ : IsScalarTower A K L
inst✝⁷ : IsScalarTower A B L
inst✝⁶ : IsDomain A
inst✝⁵ : IsDomain B
inst✝⁴ : IsFractionRing A K
inst✝³ : IsIntegralClosure B A L
inst✝² : IsFractionRing B L
inst✝¹ : FiniteDimensional K L
inst✝ : IsSeparable K L
x✝ : L
⊢ x✝ ∈ ⊥ᵛ ↔ x✝ ∈ ⊤

Next tactic:
simpa [mem_traceDual, -RingHom.mem_range] using zero_mem _
open scoped Classical in
lemma traceDual_top' :
    (⊤ : Submodule B L)ᵛ =
      if ((LinearMap.range (Algebra.trace K L)).restrictScalars A ≤ 1) then ⊤ else ⊥ := by
  

Proof state:
A : Type u_1
K : Type u_2
L : Type u
B : Type u_3
inst✝¹⁷ : CommRing A
inst✝¹⁶ : Field K
inst✝¹⁵ : CommRing B
inst✝¹⁴ : Field L
inst✝¹³ : Algebra A K
inst✝¹² : Algebra B L
inst✝¹¹ : Algebra A B
inst✝¹⁰ : Algebra K L
inst✝⁹ : Algebra A L
inst✝⁸ : IsScalarTower A K L
inst✝⁷ : IsScalarTower A B L
inst✝⁶ : IsDomain A
inst✝⁵ : IsDomain B
inst✝⁴ : IsFractionRing A K
inst✝³ : IsIntegralClosure B A L
inst✝² : IsFractionRing B L
inst✝¹ : FiniteDimensional K L
inst✝ : IsSeparable K L
⊢ ⊤ᵛ = if restrictScalars A (LinearMap.range (Algebra.trace K L)) ≤ 1 then ⊤ else ⊥

Next tactic:
classical
  split_ifs with h
  · rw [_root_.eq_top_iff]
    exact fun _ _ _ _ ↦ h ⟨_, rfl⟩
  · rw [_root_.eq_bot_iff]
    intro x hx
    change ¬∀ x, _ → _ at h; push_neg at h
    show x = 0; by_contra hx'
    obtain ⟨_, ⟨b, rfl⟩, hb⟩ := h
    apply hb
    simpa [hx'] using hx (x⁻¹ * b) trivial
open scoped Classical in
lemma traceDual_top' :
    (⊤ : Submodule B L)ᵛ =
      if ((LinearMap.range (Algebra.trace K L)).restrictScalars A ≤ 1) then ⊤ else ⊥ := by
  classical
  

Proof state:
A : Type u_1
K : Type u_2
L : Type u
B : Type u_3
inst✝¹⁷ : CommRing A
inst✝¹⁶ : Field K
inst✝¹⁵ : CommRing B
inst✝¹⁴ : Field L
inst✝¹³ : Algebra A K
inst✝¹² : Algebra B L
inst✝¹¹ : Algebra A B
inst✝¹⁰ : Algebra K L
inst✝⁹ : Algebra A L
inst✝⁸ : IsScalarTower A K L
inst✝⁷ : IsScalarTower A B L
inst✝⁶ : IsDomain A
inst✝⁵ : IsDomain B
inst✝⁴ : IsFractionRing A K
inst✝³ : IsIntegralClosure B A L
inst✝² : IsFractionRing B L
inst✝¹ : FiniteDimensional K L
inst✝ : IsSeparable K L
⊢ ⊤ᵛ = if restrictScalars A (LinearMap.range (Algebra.trace K L)) ≤ 1 then ⊤ else ⊥

Next tactic:
split_ifs with h
open scoped Classical in
lemma traceDual_top' :
    (⊤ : Submodule B L)ᵛ =
      if ((LinearMap.range (Algebra.trace K L)).restrictScalars A ≤ 1) then ⊤ else ⊥ := by
  classical
  split_ifs with h
  · 

Proof state:
case pos
A : Type u_1
K : Type u_2
L : Type u
B : Type u_3
inst✝¹⁷ : CommRing A
inst✝¹⁶ : Field K
inst✝¹⁵ : CommRing B
inst✝¹⁴ : Field L
inst✝¹³ : Algebra A K
inst✝¹² : Algebra B L
inst✝¹¹ : Algebra A B
inst✝¹⁰ : Algebra K L
inst✝⁹ : Algebra A L
inst✝⁸ : IsScalarTower A K L
inst✝⁷ : IsScalarTower A B L
inst✝⁶ : IsDomain A
inst✝⁵ : IsDomain B
inst✝⁴ : IsFractionRing A K
inst✝³ : IsIntegralClosure B A L
inst✝² : IsFractionRing B L
inst✝¹ : FiniteDimensional K L
inst✝ : IsSeparable K L
h : restrictScalars A (LinearMap.range (Algebra.trace K L)) ≤ 1
⊢ ⊤ᵛ = ⊤

Next tactic:
rw [_root_.eq_top_iff]
open scoped Classical in
lemma traceDual_top' :
    (⊤ : Submodule B L)ᵛ =
      if ((LinearMap.range (Algebra.trace K L)).restrictScalars A ≤ 1) then ⊤ else ⊥ := by
  classical
  split_ifs with h
  · rw [_root_.eq_top_iff]
    

Proof state:
case pos
A : Type u_1
K : Type u_2
L : Type u
B : Type u_3
inst✝¹⁷ : CommRing A
inst✝¹⁶ : Field K
inst✝¹⁵ : CommRing B
inst✝¹⁴ : Field L
inst✝¹³ : Algebra A K
inst✝¹² : Algebra B L
inst✝¹¹ : Algebra A B
inst✝¹⁰ : Algebra K L
inst✝⁹ : Algebra A L
inst✝⁸ : IsScalarTower A K L
inst✝⁷ : IsScalarTower A B L
inst✝⁶ : IsDomain A
inst✝⁵ : IsDomain B
inst✝⁴ : IsFractionRing A K
inst✝³ : IsIntegralClosure B A L
inst✝² : IsFractionRing B L
inst✝¹ : FiniteDimensional K L
inst✝ : IsSeparable K L
h : restrictScalars A (LinearMap.range (Algebra.trace K L)) ≤ 1
⊢ ⊤ ≤ ⊤ᵛ

Next tactic:
exact fun _ _ _ _ ↦ h ⟨_, rfl⟩
open scoped Classical in
lemma traceDual_top' :
    (⊤ : Submodule B L)ᵛ =
      if ((LinearMap.range (Algebra.trace K L)).restrictScalars A ≤ 1) then ⊤ else ⊥ := by
  classical
  split_ifs with h
  · rw [_root_.eq_top_iff]
    exact fun _ _ _ _ ↦ h ⟨_, rfl⟩
  · 

Proof state:
case neg
A : Type u_1
K : Type u_2
L : Type u
B : Type u_3
inst✝¹⁷ : CommRing A
inst✝¹⁶ : Field K
inst✝¹⁵ : CommRing B
inst✝¹⁴ : Field L
inst✝¹³ : Algebra A K
inst✝¹² : Algebra B L
inst✝¹¹ : Algebra A B
inst✝¹⁰ : Algebra K L
inst✝⁹ : Algebra A L
inst✝⁸ : IsScalarTower A K L
inst✝⁷ : IsScalarTower A B L
inst✝⁶ : IsDomain A
inst✝⁵ : IsDomain B
inst✝⁴ : IsFractionRing A K
inst✝³ : IsIntegralClosure B A L
inst✝² : IsFractionRing B L
inst✝¹ : FiniteDimensional K L
inst✝ : IsSeparable K L
h : ¬restrictScalars A (LinearMap.range (Algebra.trace K L)) ≤ 1
⊢ ⊤ᵛ = ⊥

Next tactic:
rw [_root_.eq_bot_iff]
open scoped Classical in
lemma traceDual_top' :
    (⊤ : Submodule B L)ᵛ =
      if ((LinearMap.range (Algebra.trace K L)).restrictScalars A ≤ 1) then ⊤ else ⊥ := by
  classical
  split_ifs with h
  · rw [_root_.eq_top_iff]
    exact fun _ _ _ _ ↦ h ⟨_, rfl⟩
  · rw [_root_.eq_bot_iff]
    

Proof state:
case neg
A : Type u_1
K : Type u_2
L : Type u
B : Type u_3
inst✝¹⁷ : CommRing A
inst✝¹⁶ : Field K
inst✝¹⁵ : CommRing B
inst✝¹⁴ : Field L
inst✝¹³ : Algebra A K
inst✝¹² : Algebra B L
inst✝¹¹ : Algebra A B
inst✝¹⁰ : Algebra K L
inst✝⁹ : Algebra A L
inst✝⁸ : IsScalarTower A K L
inst✝⁷ : IsScalarTower A B L
inst✝⁶ : IsDomain A
inst✝⁵ : IsDomain B
inst✝⁴ : IsFractionRing A K
inst✝³ : IsIntegralClosure B A L
inst✝² : IsFractionRing B L
inst✝¹ : FiniteDimensional K L
inst✝ : IsSeparable K L
h : ¬restrictScalars A (LinearMap.range (Algebra.trace K L)) ≤ 1
⊢ ⊤ᵛ ≤ ⊥

Next tactic:
intro x hx
open scoped Classical in
lemma traceDual_top' :
    (⊤ : Submodule B L)ᵛ =
      if ((LinearMap.range (Algebra.trace K L)).restrictScalars A ≤ 1) then ⊤ else ⊥ := by
  classical
  split_ifs with h
  · rw [_root_.eq_top_iff]
    exact fun _ _ _ _ ↦ h ⟨_, rfl⟩
  · rw [_root_.eq_bot_iff]
    intro x hx
    

Proof state:
case neg
A : Type u_1
K : Type u_2
L : Type u
B : Type u_3
inst✝¹⁷ : CommRing A
inst✝¹⁶ : Field K
inst✝¹⁵ : CommRing B
inst✝¹⁴ : Field L
inst✝¹³ : Algebra A K
inst✝¹² : Algebra B L
inst✝¹¹ : Algebra A B
inst✝¹⁰ : Algebra K L
inst✝⁹ : Algebra A L
inst✝⁸ : IsScalarTower A K L
inst✝⁷ : IsScalarTower A B L
inst✝⁶ : IsDomain A
inst✝⁵ : IsDomain B
inst✝⁴ : IsFractionRing A K
inst✝³ : IsIntegralClosure B A L
inst✝² : IsFractionRing B L
inst✝¹ : FiniteDimensional K L
inst✝ : IsSeparable K L
h : ¬restrictScalars A (LinearMap.range (Algebra.trace K L)) ≤ 1
x : L
hx : x ∈ ⊤ᵛ
⊢ x ∈ ⊥

Next tactic:
change ¬∀ x, _ → _ at h
open scoped Classical in
lemma traceDual_top' :
    (⊤ : Submodule B L)ᵛ =
      if ((LinearMap.range (Algebra.trace K L)).restrictScalars A ≤ 1) then ⊤ else ⊥ := by
  classical
  split_ifs with h
  · rw [_root_.eq_top_iff]
    exact fun _ _ _ _ ↦ h ⟨_, rfl⟩
  · rw [_root_.eq_bot_iff]
    intro x hx
    change ¬∀ x, _ → _ at h; 

Proof state:
case neg
A : Type u_1
K : Type u_2
L : Type u
B : Type u_3
inst✝¹⁷ : CommRing A
inst✝¹⁶ : Field K
inst✝¹⁵ : CommRing B
inst✝¹⁴ : Field L
inst✝¹³ : Algebra A K
inst✝¹² : Algebra B L
inst✝¹¹ : Algebra A B
inst✝¹⁰ : Algebra K L
inst✝⁹ : Algebra A L
inst✝⁸ : IsScalarTower A K L
inst✝⁷ : IsScalarTower A B L
inst✝⁶ : IsDomain A
inst✝⁵ : IsDomain B
inst✝⁴ : IsFractionRing A K
inst✝³ : IsIntegralClosure B A L
inst✝² : IsFractionRing B L
inst✝¹ : FiniteDimensional K L
inst✝ : IsSeparable K L
x : L
hx : x ∈ ⊤ᵛ
h : ¬∀ x ∈ restrictScalars A (LinearMap.range (Algebra.trace K L)), x ∈ 1
⊢ x ∈ ⊥

Next tactic:
push_neg at h
open scoped Classical in
lemma traceDual_top' :
    (⊤ : Submodule B L)ᵛ =
      if ((LinearMap.range (Algebra.trace K L)).restrictScalars A ≤ 1) then ⊤ else ⊥ := by
  classical
  split_ifs with h
  · rw [_root_.eq_top_iff]
    exact fun _ _ _ _ ↦ h ⟨_, rfl⟩
  · rw [_root_.eq_bot_iff]
    intro x hx
    change ¬∀ x, _ → _ at h; push_neg at h
    

Proof state:
case neg
A : Type u_1
K : Type u_2
L : Type u
B : Type u_3
inst✝¹⁷ : CommRing A
inst✝¹⁶ : Field K
inst✝¹⁵ : CommRing B
inst✝¹⁴ : Field L
inst✝¹³ : Algebra A K
inst✝¹² : Algebra B L
inst✝¹¹ : Algebra A B
inst✝¹⁰ : Algebra K L
inst✝⁹ : Algebra A L
inst✝⁸ : IsScalarTower A K L
inst✝⁷ : IsScalarTower A B L
inst✝⁶ : IsDomain A
inst✝⁵ : IsDomain B
inst✝⁴ : IsFractionRing A K
inst✝³ : IsIntegralClosure B A L
inst✝² : IsFractionRing B L
inst✝¹ : FiniteDimensional K L
inst✝ : IsSeparable K L
x : L
hx : x ∈ ⊤ᵛ
h : ∃ x ∈ restrictScalars A (LinearMap.range (Algebra.trace K L)), x ∉ 1
⊢ x ∈ ⊥

Next tactic:
show x = 0
open scoped Classical in
lemma traceDual_top' :
    (⊤ : Submodule B L)ᵛ =
      if ((LinearMap.range (Algebra.trace K L)).restrictScalars A ≤ 1) then ⊤ else ⊥ := by
  classical
  split_ifs with h
  · rw [_root_.eq_top_iff]
    exact fun _ _ _ _ ↦ h ⟨_, rfl⟩
  · rw [_root_.eq_bot_iff]
    intro x hx
    change ¬∀ x, _ → _ at h; push_neg at h
    show x = 0; 

Proof state:
case neg
A : Type u_1
K : Type u_2
L : Type u
B : Type u_3
inst✝¹⁷ : CommRing A
inst✝¹⁶ : Field K
inst✝¹⁵ : CommRing B
inst✝¹⁴ : Field L
inst✝¹³ : Algebra A K
inst✝¹² : Algebra B L
inst✝¹¹ : Algebra A B
inst✝¹⁰ : Algebra K L
inst✝⁹ : Algebra A L
inst✝⁸ : IsScalarTower A K L
inst✝⁷ : IsScalarTower A B L
inst✝⁶ : IsDomain A
inst✝⁵ : IsDomain B
inst✝⁴ : IsFractionRing A K
inst✝³ : IsIntegralClosure B A L
inst✝² : IsFractionRing B L
inst✝¹ : FiniteDimensional K L
inst✝ : IsSeparable K L
x : L
hx : x ∈ ⊤ᵛ
h : ∃ x ∈ restrictScalars A (LinearMap.range (Algebra.trace K L)), x ∉ 1
⊢ x = 0

Next tactic:
by_contra hx'
open scoped Classical in
lemma traceDual_top' :
    (⊤ : Submodule B L)ᵛ =
      if ((LinearMap.range (Algebra.trace K L)).restrictScalars A ≤ 1) then ⊤ else ⊥ := by
  classical
  split_ifs with h
  · rw [_root_.eq_top_iff]
    exact fun _ _ _ _ ↦ h ⟨_, rfl⟩
  · rw [_root_.eq_bot_iff]
    intro x hx
    change ¬∀ x, _ → _ at h; push_neg at h
    show x = 0; by_contra hx'
    

Proof state:
case neg
A : Type u_1
K : Type u_2
L : Type u
B : Type u_3
inst✝¹⁷ : CommRing A
inst✝¹⁶ : Field K
inst✝¹⁵ : CommRing B
inst✝¹⁴ : Field L
inst✝¹³ : Algebra A K
inst✝¹² : Algebra B L
inst✝¹¹ : Algebra A B
inst✝¹⁰ : Algebra K L
inst✝⁹ : Algebra A L
inst✝⁸ : IsScalarTower A K L
inst✝⁷ : IsScalarTower A B L
inst✝⁶ : IsDomain A
inst✝⁵ : IsDomain B
inst✝⁴ : IsFractionRing A K
inst✝³ : IsIntegralClosure B A L
inst✝² : IsFractionRing B L
inst✝¹ : FiniteDimensional K L
inst✝ : IsSeparable K L
x : L
hx : x ∈ ⊤ᵛ
h : ∃ x ∈ restrictScalars A (LinearMap.range (Algebra.trace K L)), x ∉ 1
hx' : ¬x = 0
⊢ False

Next tactic:
obtain ⟨_, ⟨b, rfl⟩, hb⟩ := h
open scoped Classical in
lemma traceDual_top' :
    (⊤ : Submodule B L)ᵛ =
      if ((LinearMap.range (Algebra.trace K L)).restrictScalars A ≤ 1) then ⊤ else ⊥ := by
  classical
  split_ifs with h
  · rw [_root_.eq_top_iff]
    exact fun _ _ _ _ ↦ h ⟨_, rfl⟩
  · rw [_root_.eq_bot_iff]
    intro x hx
    change ¬∀ x, _ → _ at h; push_neg at h
    show x = 0; by_contra hx'
    obtain ⟨_, ⟨b, rfl⟩, hb⟩ := h
    

Proof state:
case neg.intro.intro.intro
A : Type u_1
K : Type u_2
L : Type u
B : Type u_3
inst✝¹⁷ : CommRing A
inst✝¹⁶ : Field K
inst✝¹⁵ : CommRing B
inst✝¹⁴ : Field L
inst✝¹³ : Algebra A K
inst✝¹² : Algebra B L
inst✝¹¹ : Algebra A B
inst✝¹⁰ : Algebra K L
inst✝⁹ : Algebra A L
inst✝⁸ : IsScalarTower A K L
inst✝⁷ : IsScalarTower A B L
inst✝⁶ : IsDomain A
inst✝⁵ : IsDomain B
inst✝⁴ : IsFractionRing A K
inst✝³ : IsIntegralClosure B A L
inst✝² : IsFractionRing B L
inst✝¹ : FiniteDimensional K L
inst✝ : IsSeparable K L
x : L
hx : x ∈ ⊤ᵛ
hx' : ¬x = 0
b : L
hb : (Algebra.trace K L) b ∉ 1
⊢ False

Next tactic:
apply hb
open scoped Classical in
lemma traceDual_top' :
    (⊤ : Submodule B L)ᵛ =
      if ((LinearMap.range (Algebra.trace K L)).restrictScalars A ≤ 1) then ⊤ else ⊥ := by
  classical
  split_ifs with h
  · rw [_root_.eq_top_iff]
    exact fun _ _ _ _ ↦ h ⟨_, rfl⟩
  · rw [_root_.eq_bot_iff]
    intro x hx
    change ¬∀ x, _ → _ at h; push_neg at h
    show x = 0; by_contra hx'
    obtain ⟨_, ⟨b, rfl⟩, hb⟩ := h
    apply hb
    

Proof state:
case neg.intro.intro.intro
A : Type u_1
K : Type u_2
L : Type u
B : Type u_3
inst✝¹⁷ : CommRing A
inst✝¹⁶ : Field K
inst✝¹⁵ : CommRing B
inst✝¹⁴ : Field L
inst✝¹³ : Algebra A K
inst✝¹² : Algebra B L
inst✝¹¹ : Algebra A B
inst✝¹⁰ : Algebra K L
inst✝⁹ : Algebra A L
inst✝⁸ : IsScalarTower A K L
inst✝⁷ : IsScalarTower A B L
inst✝⁶ : IsDomain A
inst✝⁵ : IsDomain B
inst✝⁴ : IsFractionRing A K
inst✝³ : IsIntegralClosure B A L
inst✝² : IsFractionRing B L
inst✝¹ : FiniteDimensional K L
inst✝ : IsSeparable K L
x : L
hx : x ∈ ⊤ᵛ
hx' : ¬x = 0
b : L
hb : (Algebra.trace K L) b ∉ 1
⊢ (Algebra.trace K L) b ∈ 1

Next tactic:
simpa [hx'] using hx (x⁻¹ * b) trivial
lemma traceDual_top [Decidable (IsField A)] :
    (⊤ : Submodule B L)ᵛ = if IsField A then ⊤ else ⊥ := by
  

Proof state:
A : Type u_1
K : Type u_2
L : Type u
B : Type u_3
inst✝¹⁸ : CommRing A
inst✝¹⁷ : Field K
inst✝¹⁶ : CommRing B
inst✝¹⁵ : Field L
inst✝¹⁴ : Algebra A K
inst✝¹³ : Algebra B L
inst✝¹² : Algebra A B
inst✝¹¹ : Algebra K L
inst✝¹⁰ : Algebra A L
inst✝⁹ : IsScalarTower A K L
inst✝⁸ : IsScalarTower A B L
inst✝⁷ : IsDomain A
inst✝⁶ : IsDomain B
inst✝⁵ : IsFractionRing A K
inst✝⁴ : IsIntegralClosure B A L
inst✝³ : IsFractionRing B L
inst✝² : FiniteDimensional K L
inst✝¹ : IsSeparable K L
inst✝ : Decidable (IsField A)
⊢ ⊤ᵛ = if IsField A then ⊤ else ⊥

Next tactic:
convert traceDual_top'
lemma traceDual_top [Decidable (IsField A)] :
    (⊤ : Submodule B L)ᵛ = if IsField A then ⊤ else ⊥ := by
  convert traceDual_top'
  

Proof state:
case h.e'_3.h₁.a
A : Type u_1
K : Type u_2
L : Type u
B : Type u_3
inst✝¹⁸ : CommRing A
inst✝¹⁷ : Field K
inst✝¹⁶ : CommRing B
inst✝¹⁵ : Field L
inst✝¹⁴ : Algebra A K
inst✝¹³ : Algebra B L
inst✝¹² : Algebra A B
inst✝¹¹ : Algebra K L
inst✝¹⁰ : Algebra A L
inst✝⁹ : IsScalarTower A K L
inst✝⁸ : IsScalarTower A B L
inst✝⁷ : IsDomain A
inst✝⁶ : IsDomain B
inst✝⁵ : IsFractionRing A K
inst✝⁴ : IsIntegralClosure B A L
inst✝³ : IsFractionRing B L
inst✝² : FiniteDimensional K L
inst✝¹ : IsSeparable K L
inst✝ : Decidable (IsField A)
⊢ IsField A ↔ restrictScalars A (LinearMap.range (Algebra.trace K L)) ≤ 1

Next tactic:
rw [← IsFractionRing.surjective_iff_isField (R := A) (K := K),
    LinearMap.range_eq_top.mpr (Algebra.trace_surjective K L),
    ← RingHom.range_top_iff_surjective, _root_.eq_top_iff, SetLike.le_def]
lemma traceDual_top [Decidable (IsField A)] :
    (⊤ : Submodule B L)ᵛ = if IsField A then ⊤ else ⊥ := by
  convert traceDual_top'
  rw [← IsFractionRing.surjective_iff_isField (R := A) (K := K),
    LinearMap.range_eq_top.mpr (Algebra.trace_surjective K L),
    ← RingHom.range_top_iff_surjective, _root_.eq_top_iff, SetLike.le_def]
  

Proof state:
case h.e'_3.h₁.a
A : Type u_1
K : Type u_2
L : Type u
B : Type u_3
inst✝¹⁸ : CommRing A
inst✝¹⁷ : Field K
inst✝¹⁶ : CommRing B
inst✝¹⁵ : Field L
inst✝¹⁴ : Algebra A K
inst✝¹³ : Algebra B L
inst✝¹² : Algebra A B
inst✝¹¹ : Algebra K L
inst✝¹⁰ : Algebra A L
inst✝⁹ : IsScalarTower A K L
inst✝⁸ : IsScalarTower A B L
inst✝⁷ : IsDomain A
inst✝⁶ : IsDomain B
inst✝⁵ : IsFractionRing A K
inst✝⁴ : IsIntegralClosure B A L
inst✝³ : IsFractionRing B L
inst✝² : FiniteDimensional K L
inst✝¹ : IsSeparable K L
inst✝ : Decidable (IsField A)
⊢ (∀ ⦃x : K⦄, x ∈ ⊤ → x ∈ RingHom.range (algebraMap A K)) ↔ restrictScalars A ⊤ ≤ 1

Next tactic:
rfl
lemma Submodule.one_le_traceDual_one :
    (1 : Submodule B L) ≤ 1ᵛ := by
  

Proof state:
A : Type u_1
K : Type u_2
L : Type u
B : Type u_3
inst✝¹⁸ : CommRing A
inst✝¹⁷ : Field K
inst✝¹⁶ : CommRing B
inst✝¹⁵ : Field L
inst✝¹⁴ : Algebra A K
inst✝¹³ : Algebra B L
inst✝¹² : Algebra A B
inst✝¹¹ : Algebra K L
inst✝¹⁰ : Algebra A L
inst✝⁹ : IsScalarTower A K L
inst✝⁸ : IsScalarTower A B L
inst✝⁷ : IsDomain A
inst✝⁶ : IsDomain B
inst✝⁵ : IsFractionRing A K
inst✝⁴ : IsIntegralClosure B A L
inst✝³ : IsFractionRing B L
inst✝² : FiniteDimensional K L
inst✝¹ : IsSeparable K L
inst✝ : IsIntegrallyClosed A
⊢ 1 ≤ 1ᵛ

Next tactic:
rw [le_traceDual_iff_map_le_one, mul_one]
lemma Submodule.one_le_traceDual_one :
    (1 : Submodule B L) ≤ 1ᵛ := by
  rw [le_traceDual_iff_map_le_one, mul_one]
  

Proof state:
A : Type u_1
K : Type u_2
L : Type u
B : Type u_3
inst✝¹⁸ : CommRing A
inst✝¹⁷ : Field K
inst✝¹⁶ : CommRing B
inst✝¹⁵ : Field L
inst✝¹⁴ : Algebra A K
inst✝¹³ : Algebra B L
inst✝¹² : Algebra A B
inst✝¹¹ : Algebra K L
inst✝¹⁰ : Algebra A L
inst✝⁹ : IsScalarTower A K L
inst✝⁸ : IsScalarTower A B L
inst✝⁷ : IsDomain A
inst✝⁶ : IsDomain B
inst✝⁵ : IsFractionRing A K
inst✝⁴ : IsIntegralClosure B A L
inst✝³ : IsFractionRing B L
inst✝² : FiniteDimensional K L
inst✝¹ : IsSeparable K L
inst✝ : IsIntegrallyClosed A
⊢ map (↑A (Algebra.trace K L)) (restrictScalars A 1) ≤ 1

Next tactic:
rintro _ ⟨x, ⟨x, rfl⟩, rfl⟩