l3lab/ntp-mathlib huggingface dataset:
theorem KaehlerDifferential.kerTotal_map (h : Function.Surjective (algebraMap A B)) :
    (KaehlerDifferential.kerTotal R A).map finsupp_map ⊔
        Submodule.span A (Set.range fun x : S => single (algebraMap S B x) (1 : B)) =
      (KaehlerDifferential.kerTotal S B).restrictScalars _ := by
  rw [KaehlerDifferential.kerTotal, Submodule.map_span, KaehlerDifferential.kerTotal,
    Submodule.restrictScalars_span _ _ h]
  -- Porting note: the proof is diverging from the mathlib3 proof here.
  -- `map_sub` and `map_add` are not firing so we need to use `LinearMap.map_*` instead
  simp_rw [Set.image_union, Submodule.span_union, ← Set.image_univ, Set.image_image, Set.image_univ,
    LinearMap.map_sub, LinearMap.map_add]
  simp only [LinearMap.comp_apply, Finsupp.lmapDomain_apply, Finsupp.mapDomain_single,
    Finsupp.mapRange.linearMap_apply, Finsupp.mapRange_single, Algebra.linearMap_apply,
    map_one, map_add, map_mul]
  

Proof state:
R : Type u
S : Type v
inst✝¹⁴ : CommRing R
inst✝¹³ : CommRing S
inst✝¹² : Algebra R S
M : Type u_1
inst✝¹¹ : AddCommGroup M
inst✝¹⁰ : Module R M
inst✝⁹ : Module S M
inst✝⁸ : IsScalarTower R S M
A : Type u_2
B : Type u_3
inst✝⁷ : CommRing A
inst✝⁶ : CommRing B
inst✝⁵ : Algebra R A
inst✝⁴ : Algebra S B
inst✝³ : Algebra R B
inst✝² : Algebra A B
inst✝¹ : IsScalarTower R S B
inst✝ : IsScalarTower R A B
h : Function.Surjective ⇑(algebraMap A B)
⊢ Submodule.span A
            (Set.range fun x =>
              ((fun₀ | (algebraMap A B) x.1 => 1) + fun₀ | (algebraMap A B) x.2 => 1) -
                fun₀ | (algebraMap A B) x.1 + (algebraMap A B) x.2 => 1) ⊔
          Submodule.span A
            (Set.range fun x =>
              ((fun₀ | (algebraMap A B) x.2 => (algebraMap A B) x.1) +
                  fun₀ | (algebraMap A B) x.1 => (algebraMap A B) x.2) -
                fun₀ | (algebraMap A B) x.1 * (algebraMap A B) x.2 => 1) ⊔
        Submodule.span A (Set.range fun x => fun₀ | (algebraMap A B) ((algebraMap R A) x) => 1) ⊔
      Submodule.span A (Set.range fun x => fun₀ | (algebraMap S B) x => 1) =
    Submodule.span A (Set.range fun x => ((fun₀ | x.1 => 1) + fun₀ | x.2 => 1) - fun₀ | x.1 + x.2 => 1) ⊔
        Submodule.span A (Set.range fun x => ((fun₀ | x.2 => x.1) + fun₀ | x.1 => x.2) - fun₀ | x.1 * x.2 => 1) ⊔
      Submodule.span A (Set.range fun x => fun₀ | (algebraMap S B) x => 1)

Next tactic:
simp_rw [sup_assoc, ← (h.Prod_map h).range_comp]
theorem KaehlerDifferential.kerTotal_map (h : Function.Surjective (algebraMap A B)) :
    (KaehlerDifferential.kerTotal R A).map finsupp_map ⊔
        Submodule.span A (Set.range fun x : S => single (algebraMap S B x) (1 : B)) =
      (KaehlerDifferential.kerTotal S B).restrictScalars _ := by
  rw [KaehlerDifferential.kerTotal, Submodule.map_span, KaehlerDifferential.kerTotal,
    Submodule.restrictScalars_span _ _ h]
  -- Porting note: the proof is diverging from the mathlib3 proof here.
  -- `map_sub` and `map_add` are not firing so we need to use `LinearMap.map_*` instead
  simp_rw [Set.image_union, Submodule.span_union, ← Set.image_univ, Set.image_image, Set.image_univ,
    LinearMap.map_sub, LinearMap.map_add]
  simp only [LinearMap.comp_apply, Finsupp.lmapDomain_apply, Finsupp.mapDomain_single,
    Finsupp.mapRange.linearMap_apply, Finsupp.mapRange_single, Algebra.linearMap_apply,
    map_one, map_add, map_mul]
  simp_rw [sup_assoc, ← (h.Prod_map h).range_comp]
  

Proof state:
R : Type u
S : Type v
inst✝¹⁴ : CommRing R
inst✝¹³ : CommRing S
inst✝¹² : Algebra R S
M : Type u_1
inst✝¹¹ : AddCommGroup M
inst✝¹⁰ : Module R M
inst✝⁹ : Module S M
inst✝⁸ : IsScalarTower R S M
A : Type u_2
B : Type u_3
inst✝⁷ : CommRing A
inst✝⁶ : CommRing B
inst✝⁵ : Algebra R A
inst✝⁴ : Algebra S B
inst✝³ : Algebra R B
inst✝² : Algebra A B
inst✝¹ : IsScalarTower R S B
inst✝ : IsScalarTower R A B
h : Function.Surjective ⇑(algebraMap A B)
⊢ Submodule.span A
        (Set.range fun x =>
          ((fun₀ | (algebraMap A B) x.1 => 1) + fun₀ | (algebraMap A B) x.2 => 1) -
            fun₀ | (algebraMap A B) x.1 + (algebraMap A B) x.2 => 1) ⊔
      (Submodule.span A
          (Set.range fun x =>
            ((fun₀ | (algebraMap A B) x.2 => (algebraMap A B) x.1) +
                fun₀ | (algebraMap A B) x.1 => (algebraMap A B) x.2) -
              fun₀ | (algebraMap A B) x.1 * (algebraMap A B) x.2 => 1) ⊔
        (Submodule.span A (Set.range fun x => fun₀ | (algebraMap A B) ((algebraMap R A) x) => 1) ⊔
          Submodule.span A (Set.range fun x => fun₀ | (algebraMap S B) x => 1))) =
    Submodule.span A
        (Set.range
          ((fun x => ((fun₀ | x.1 => 1) + fun₀ | x.2 => 1) - fun₀ | x.1 + x.2 => 1) ∘
            Prod.map ⇑(algebraMap A B) ⇑(algebraMap A B))) ⊔
      (Submodule.span A
          (Set.range
            ((fun x => ((fun₀ | x.2 => x.1) + fun₀ | x.1 => x.2) - fun₀ | x.1 * x.2 => 1) ∘
              Prod.map ⇑(algebraMap A B) ⇑(algebraMap A B))) ⊔
        Submodule.span A (Set.range fun x => fun₀ | (algebraMap S B) x => 1))

Next tactic:
congr!
theorem KaehlerDifferential.kerTotal_map (h : Function.Surjective (algebraMap A B)) :
    (KaehlerDifferential.kerTotal R A).map finsupp_map ⊔
        Submodule.span A (Set.range fun x : S => single (algebraMap S B x) (1 : B)) =
      (KaehlerDifferential.kerTotal S B).restrictScalars _ := by
  rw [KaehlerDifferential.kerTotal, Submodule.map_span, KaehlerDifferential.kerTotal,
    Submodule.restrictScalars_span _ _ h]
  -- Porting note: the proof is diverging from the mathlib3 proof here.
  -- `map_sub` and `map_add` are not firing so we need to use `LinearMap.map_*` instead
  simp_rw [Set.image_union, Submodule.span_union, ← Set.image_univ, Set.image_image, Set.image_univ,
    LinearMap.map_sub, LinearMap.map_add]
  simp only [LinearMap.comp_apply, Finsupp.lmapDomain_apply, Finsupp.mapDomain_single,
    Finsupp.mapRange.linearMap_apply, Finsupp.mapRange_single, Algebra.linearMap_apply,
    map_one, map_add, map_mul]
  simp_rw [sup_assoc, ← (h.Prod_map h).range_comp]
  congr!
  -- Porting note: new
  

Proof state:
case h.e'_4.h.e'_4
R : Type u
S : Type v
inst✝¹⁴ : CommRing R
inst✝¹³ : CommRing S
inst✝¹² : Algebra R S
M : Type u_1
inst✝¹¹ : AddCommGroup M
inst✝¹⁰ : Module R M
inst✝⁹ : Module S M
inst✝⁸ : IsScalarTower R S M
A : Type u_2
B : Type u_3
inst✝⁷ : CommRing A
inst✝⁶ : CommRing B
inst✝⁵ : Algebra R A
inst✝⁴ : Algebra S B
inst✝³ : Algebra R B
inst✝² : Algebra A B
inst✝¹ : IsScalarTower R S B
inst✝ : IsScalarTower R A B
h : Function.Surjective ⇑(algebraMap A B)
⊢ Submodule.span A (Set.range fun x => fun₀ | (algebraMap A B) ((algebraMap R A) x) => 1) ⊔
      Submodule.span A (Set.range fun x => fun₀ | (algebraMap S B) x => 1) =
    Submodule.span A (Set.range fun x => fun₀ | (algebraMap S B) x => 1)

Next tactic:
simp_rw [← IsScalarTower.algebraMap_apply R A B]
theorem KaehlerDifferential.kerTotal_map (h : Function.Surjective (algebraMap A B)) :
    (KaehlerDifferential.kerTotal R A).map finsupp_map ⊔
        Submodule.span A (Set.range fun x : S => single (algebraMap S B x) (1 : B)) =
      (KaehlerDifferential.kerTotal S B).restrictScalars _ := by
  rw [KaehlerDifferential.kerTotal, Submodule.map_span, KaehlerDifferential.kerTotal,
    Submodule.restrictScalars_span _ _ h]
  -- Porting note: the proof is diverging from the mathlib3 proof here.
  -- `map_sub` and `map_add` are not firing so we need to use `LinearMap.map_*` instead
  simp_rw [Set.image_union, Submodule.span_union, ← Set.image_univ, Set.image_image, Set.image_univ,
    LinearMap.map_sub, LinearMap.map_add]
  simp only [LinearMap.comp_apply, Finsupp.lmapDomain_apply, Finsupp.mapDomain_single,
    Finsupp.mapRange.linearMap_apply, Finsupp.mapRange_single, Algebra.linearMap_apply,
    map_one, map_add, map_mul]
  simp_rw [sup_assoc, ← (h.Prod_map h).range_comp]
  congr!
  -- Porting note: new
  simp_rw [← IsScalarTower.algebraMap_apply R A B]
  

Proof state:
case h.e'_4.h.e'_4
R : Type u
S : Type v
inst✝¹⁴ : CommRing R
inst✝¹³ : CommRing S
inst✝¹² : Algebra R S
M : Type u_1
inst✝¹¹ : AddCommGroup M
inst✝¹⁰ : Module R M
inst✝⁹ : Module S M
inst✝⁸ : IsScalarTower R S M
A : Type u_2
B : Type u_3
inst✝⁷ : CommRing A
inst✝⁶ : CommRing B
inst✝⁵ : Algebra R A
inst✝⁴ : Algebra S B
inst✝³ : Algebra R B
inst✝² : Algebra A B
inst✝¹ : IsScalarTower R S B
inst✝ : IsScalarTower R A B
h : Function.Surjective ⇑(algebraMap A B)
⊢ Submodule.span A (Set.range fun x => fun₀ | (algebraMap R B) x => 1) ⊔
      Submodule.span A (Set.range fun x => fun₀ | (algebraMap S B) x => 1) =
    Submodule.span A (Set.range fun x => fun₀ | (algebraMap S B) x => 1)

Next tactic:
rw [sup_eq_right]
theorem KaehlerDifferential.kerTotal_map (h : Function.Surjective (algebraMap A B)) :
    (KaehlerDifferential.kerTotal R A).map finsupp_map ⊔
        Submodule.span A (Set.range fun x : S => single (algebraMap S B x) (1 : B)) =
      (KaehlerDifferential.kerTotal S B).restrictScalars _ := by
  rw [KaehlerDifferential.kerTotal, Submodule.map_span, KaehlerDifferential.kerTotal,
    Submodule.restrictScalars_span _ _ h]
  -- Porting note: the proof is diverging from the mathlib3 proof here.
  -- `map_sub` and `map_add` are not firing so we need to use `LinearMap.map_*` instead
  simp_rw [Set.image_union, Submodule.span_union, ← Set.image_univ, Set.image_image, Set.image_univ,
    LinearMap.map_sub, LinearMap.map_add]
  simp only [LinearMap.comp_apply, Finsupp.lmapDomain_apply, Finsupp.mapDomain_single,
    Finsupp.mapRange.linearMap_apply, Finsupp.mapRange_single, Algebra.linearMap_apply,
    map_one, map_add, map_mul]
  simp_rw [sup_assoc, ← (h.Prod_map h).range_comp]
  congr!
  -- Porting note: new
  simp_rw [← IsScalarTower.algebraMap_apply R A B]
  rw [sup_eq_right]
  

Proof state:
case h.e'_4.h.e'_4
R : Type u
S : Type v
inst✝¹⁴ : CommRing R
inst✝¹³ : CommRing S
inst✝¹² : Algebra R S
M : Type u_1
inst✝¹¹ : AddCommGroup M
inst✝¹⁰ : Module R M
inst✝⁹ : Module S M
inst✝⁸ : IsScalarTower R S M
A : Type u_2
B : Type u_3
inst✝⁷ : CommRing A
inst✝⁶ : CommRing B
inst✝⁵ : Algebra R A
inst✝⁴ : Algebra S B
inst✝³ : Algebra R B
inst✝² : Algebra A B
inst✝¹ : IsScalarTower R S B
inst✝ : IsScalarTower R A B
h : Function.Surjective ⇑(algebraMap A B)
⊢ Submodule.span A (Set.range fun x => fun₀ | (algebraMap R B) x => 1) ≤
    Submodule.span A (Set.range fun x => fun₀ | (algebraMap S B) x => 1)

Next tactic:
apply Submodule.span_mono
theorem KaehlerDifferential.kerTotal_map (h : Function.Surjective (algebraMap A B)) :
    (KaehlerDifferential.kerTotal R A).map finsupp_map ⊔
        Submodule.span A (Set.range fun x : S => single (algebraMap S B x) (1 : B)) =
      (KaehlerDifferential.kerTotal S B).restrictScalars _ := by
  rw [KaehlerDifferential.kerTotal, Submodule.map_span, KaehlerDifferential.kerTotal,
    Submodule.restrictScalars_span _ _ h]
  -- Porting note: the proof is diverging from the mathlib3 proof here.
  -- `map_sub` and `map_add` are not firing so we need to use `LinearMap.map_*` instead
  simp_rw [Set.image_union, Submodule.span_union, ← Set.image_univ, Set.image_image, Set.image_univ,
    LinearMap.map_sub, LinearMap.map_add]
  simp only [LinearMap.comp_apply, Finsupp.lmapDomain_apply, Finsupp.mapDomain_single,
    Finsupp.mapRange.linearMap_apply, Finsupp.mapRange_single, Algebra.linearMap_apply,
    map_one, map_add, map_mul]
  simp_rw [sup_assoc, ← (h.Prod_map h).range_comp]
  congr!
  -- Porting note: new
  simp_rw [← IsScalarTower.algebraMap_apply R A B]
  rw [sup_eq_right]
  apply Submodule.span_mono
  

Proof state:
case h.e'_4.h.e'_4.h
R : Type u
S : Type v
inst✝¹⁴ : CommRing R
inst✝¹³ : CommRing S
inst✝¹² : Algebra R S
M : Type u_1
inst✝¹¹ : AddCommGroup M
inst✝¹⁰ : Module R M
inst✝⁹ : Module S M
inst✝⁸ : IsScalarTower R S M
A : Type u_2
B : Type u_3
inst✝⁷ : CommRing A
inst✝⁶ : CommRing B
inst✝⁵ : Algebra R A
inst✝⁴ : Algebra S B
inst✝³ : Algebra R B
inst✝² : Algebra A B
inst✝¹ : IsScalarTower R S B
inst✝ : IsScalarTower R A B
h : Function.Surjective ⇑(algebraMap A B)
⊢ (Set.range fun x => fun₀ | (algebraMap R B) x => 1) ⊆ Set.range fun x => fun₀ | (algebraMap S B) x => 1

Next tactic:
simp_rw [IsScalarTower.algebraMap_apply R S B]
theorem KaehlerDifferential.kerTotal_map (h : Function.Surjective (algebraMap A B)) :
    (KaehlerDifferential.kerTotal R A).map finsupp_map ⊔
        Submodule.span A (Set.range fun x : S => single (algebraMap S B x) (1 : B)) =
      (KaehlerDifferential.kerTotal S B).restrictScalars _ := by
  rw [KaehlerDifferential.kerTotal, Submodule.map_span, KaehlerDifferential.kerTotal,
    Submodule.restrictScalars_span _ _ h]
  -- Porting note: the proof is diverging from the mathlib3 proof here.
  -- `map_sub` and `map_add` are not firing so we need to use `LinearMap.map_*` instead
  simp_rw [Set.image_union, Submodule.span_union, ← Set.image_univ, Set.image_image, Set.image_univ,
    LinearMap.map_sub, LinearMap.map_add]
  simp only [LinearMap.comp_apply, Finsupp.lmapDomain_apply, Finsupp.mapDomain_single,
    Finsupp.mapRange.linearMap_apply, Finsupp.mapRange_single, Algebra.linearMap_apply,
    map_one, map_add, map_mul]
  simp_rw [sup_assoc, ← (h.Prod_map h).range_comp]
  congr!
  -- Porting note: new
  simp_rw [← IsScalarTower.algebraMap_apply R A B]
  rw [sup_eq_right]
  apply Submodule.span_mono
  simp_rw [IsScalarTower.algebraMap_apply R S B]
  

Proof state:
case h.e'_4.h.e'_4.h
R : Type u
S : Type v
inst✝¹⁴ : CommRing R
inst✝¹³ : CommRing S
inst✝¹² : Algebra R S
M : Type u_1
inst✝¹¹ : AddCommGroup M
inst✝¹⁰ : Module R M
inst✝⁹ : Module S M
inst✝⁸ : IsScalarTower R S M
A : Type u_2
B : Type u_3
inst✝⁷ : CommRing A
inst✝⁶ : CommRing B
inst✝⁵ : Algebra R A
inst✝⁴ : Algebra S B
inst✝³ : Algebra R B
inst✝² : Algebra A B
inst✝¹ : IsScalarTower R S B
inst✝ : IsScalarTower R A B
h : Function.Surjective ⇑(algebraMap A B)
⊢ (Set.range fun x => fun₀ | (algebraMap S B) ((algebraMap R S) x) => 1) ⊆
    Set.range fun x => fun₀ | (algebraMap S B) x => 1

Next tactic:
exact Set.range_comp_subset_range (algebraMap R S) fun x => single (algebraMap S B x) (1 : B)
theorem KaehlerDifferential.map_surjective_of_surjective
    (h : Function.Surjective (algebraMap A B)) :
    Function.Surjective (KaehlerDifferential.map R S A B) := by
  

Proof state:
R : Type u
S : Type v
inst✝¹⁵ : CommRing R
inst✝¹⁴ : CommRing S
inst✝¹³ : Algebra R S
M : Type u_1
inst✝¹² : AddCommGroup M
inst✝¹¹ : Module R M
inst✝¹⁰ : Module S M
inst✝⁹ : IsScalarTower R S M
A : Type u_2
B : Type u_3
inst✝⁸ : CommRing A
inst✝⁷ : CommRing B
inst✝⁶ : Algebra R A
inst✝⁵ : Algebra R B
inst✝⁴ : Algebra A B
inst✝³ : Algebra S B
inst✝² : IsScalarTower R A B
inst✝¹ : IsScalarTower R S B
inst✝ : SMulCommClass S A B
h : Function.Surjective ⇑(algebraMap A B)
⊢ Function.Surjective ⇑(map R S A B)

Next tactic:
rw [← LinearMap.range_eq_top, _root_.eq_top_iff, ← @Submodule.restrictScalars_top B A,
    ← KaehlerDifferential.span_range_derivation, Submodule.restrictScalars_span _ _ h,
    Submodule.span_le]
theorem KaehlerDifferential.map_surjective_of_surjective
    (h : Function.Surjective (algebraMap A B)) :
    Function.Surjective (KaehlerDifferential.map R S A B) := by
  rw [← LinearMap.range_eq_top, _root_.eq_top_iff, ← @Submodule.restrictScalars_top B A,
    ← KaehlerDifferential.span_range_derivation, Submodule.restrictScalars_span _ _ h,
    Submodule.span_le]
  

Proof state:
R : Type u
S : Type v
inst✝¹⁵ : CommRing R
inst✝¹⁴ : CommRing S
inst✝¹³ : Algebra R S
M : Type u_1
inst✝¹² : AddCommGroup M
inst✝¹¹ : Module R M
inst✝¹⁰ : Module S M
inst✝⁹ : IsScalarTower R S M
A : Type u_2
B : Type u_3
inst✝⁸ : CommRing A
inst✝⁷ : CommRing B
inst✝⁶ : Algebra R A
inst✝⁵ : Algebra R B
inst✝⁴ : Algebra A B
inst✝³ : Algebra S B
inst✝² : IsScalarTower R A B
inst✝¹ : IsScalarTower R S B
inst✝ : SMulCommClass S A B
h : Function.Surjective ⇑(algebraMap A B)
⊢ Set.range ⇑(D S B) ⊆ ↑(LinearMap.range (map R S A B))

Next tactic:
rintro _ ⟨x, rfl⟩
theorem KaehlerDifferential.map_surjective_of_surjective
    (h : Function.Surjective (algebraMap A B)) :
    Function.Surjective (KaehlerDifferential.map R S A B) := by
  rw [← LinearMap.range_eq_top, _root_.eq_top_iff, ← @Submodule.restrictScalars_top B A,
    ← KaehlerDifferential.span_range_derivation, Submodule.restrictScalars_span _ _ h,
    Submodule.span_le]
  rintro _ ⟨x, rfl⟩
  

Proof state:
case intro
R : Type u
S : Type v
inst✝¹⁵ : CommRing R
inst✝¹⁴ : CommRing S
inst✝¹³ : Algebra R S
M : Type u_1
inst✝¹² : AddCommGroup M
inst✝¹¹ : Module R M
inst✝¹⁰ : Module S M
inst✝⁹ : IsScalarTower R S M
A : Type u_2
B : Type u_3
inst✝⁸ : CommRing A
inst✝⁷ : CommRing B
inst✝⁶ : Algebra R A
inst✝⁵ : Algebra R B
inst✝⁴ : Algebra A B
inst✝³ : Algebra S B
inst✝² : IsScalarTower R A B
inst✝¹ : IsScalarTower R S B
inst✝ : SMulCommClass S A B
h : Function.Surjective ⇑(algebraMap A B)
x : B
⊢ (D S B) x ∈ ↑(LinearMap.range (map R S A B))

Next tactic:
obtain ⟨y, rfl⟩ := h x
theorem KaehlerDifferential.map_surjective_of_surjective
    (h : Function.Surjective (algebraMap A B)) :
    Function.Surjective (KaehlerDifferential.map R S A B) := by
  rw [← LinearMap.range_eq_top, _root_.eq_top_iff, ← @Submodule.restrictScalars_top B A,
    ← KaehlerDifferential.span_range_derivation, Submodule.restrictScalars_span _ _ h,
    Submodule.span_le]
  rintro _ ⟨x, rfl⟩
  obtain ⟨y, rfl⟩ := h x
  

Proof state:
case intro.intro
R : Type u
S : Type v
inst✝¹⁵ : CommRing R
inst✝¹⁴ : CommRing S
inst✝¹³ : Algebra R S
M : Type u_1
inst✝¹² : AddCommGroup M
inst✝¹¹ : Module R M
inst✝¹⁰ : Module S M
inst✝⁹ : IsScalarTower R S M
A : Type u_2
B : Type u_3
inst✝⁸ : CommRing A
inst✝⁷ : CommRing B
inst✝⁶ : Algebra R A
inst✝⁵ : Algebra R B
inst✝⁴ : Algebra A B
inst✝³ : Algebra S B
inst✝² : IsScalarTower R A B
inst✝¹ : IsScalarTower R S B
inst✝ : SMulCommClass S A B
h : Function.Surjective ⇑(algebraMap A B)
y : A
⊢ (D S B) ((algebraMap A B) y) ∈ ↑(LinearMap.range (map R S A B))

Next tactic:
rw [← KaehlerDifferential.map_D R S A B]
theorem KaehlerDifferential.map_surjective_of_surjective
    (h : Function.Surjective (algebraMap A B)) :
    Function.Surjective (KaehlerDifferential.map R S A B) := by
  rw [← LinearMap.range_eq_top, _root_.eq_top_iff, ← @Submodule.restrictScalars_top B A,
    ← KaehlerDifferential.span_range_derivation, Submodule.restrictScalars_span _ _ h,
    Submodule.span_le]
  rintro _ ⟨x, rfl⟩
  obtain ⟨y, rfl⟩ := h x
  rw [← KaehlerDifferential.map_D R S A B]
  

Proof state:
case intro.intro
R : Type u
S : Type v
inst✝¹⁵ : CommRing R
inst✝¹⁴ : CommRing S
inst✝¹³ : Algebra R S
M : Type u_1
inst✝¹² : AddCommGroup M
inst✝¹¹ : Module R M
inst✝¹⁰ : Module S M
inst✝⁹ : IsScalarTower R S M
A : Type u_2
B : Type u_3
inst✝⁸ : CommRing A
inst✝⁷ : CommRing B
inst✝⁶ : Algebra R A
inst✝⁵ : Algebra R B
inst✝⁴ : Algebra A B
inst✝³ : Algebra S B
inst✝² : IsScalarTower R A B
inst✝¹ : IsScalarTower R S B
inst✝ : SMulCommClass S A B
h : Function.Surjective ⇑(algebraMap A B)
y : A
⊢ (map R S A B) ((D R A) y) ∈ ↑(LinearMap.range (map R S A B))

Next tactic:
exact ⟨_, rfl⟩
@[simp]
theorem KaehlerDifferential.mapBaseChange_tmul (x : B) (y : Ω[A⁄R]) :
    KaehlerDifferential.mapBaseChange R A B (x ⊗ₜ y) = x • KaehlerDifferential.map R R A B y := by
  

Proof state:
R : Type u
S : Type v
inst✝¹⁵ : CommRing R
inst✝¹⁴ : CommRing S
inst✝¹³ : Algebra R S
M : Type u_1
inst✝¹² : AddCommGroup M
inst✝¹¹ : Module R M
inst✝¹⁰ : Module S M
inst✝⁹ : IsScalarTower R S M
A : Type u_2
B : Type u_3
inst✝⁸ : CommRing A
inst✝⁷ : CommRing B
inst✝⁶ : Algebra R A
inst✝⁵ : Algebra R B
inst✝⁴ : Algebra A B
inst✝³ : Algebra S B
inst✝² : IsScalarTower R A B
inst✝¹ : IsScalarTower R S B
inst✝ : SMulCommClass S A B
x : B
y : Ω[A⁄R]
⊢ (mapBaseChange R A B) (x ⊗ₜ[A] y) = x • (map R R A B) y

Next tactic:
conv_lhs => rw [← mul_one x, ← smul_eq_mul, ← TensorProduct.smul_tmul', LinearMap.map_smul]
@[simp]
theorem KaehlerDifferential.mapBaseChange_tmul (x : B) (y : Ω[A⁄R]) :
    KaehlerDifferential.mapBaseChange R A B (x ⊗ₜ y) = x • KaehlerDifferential.map R R A B y := by
  conv_lhs => 

Proof state:
R : Type u
S : Type v
inst✝¹⁵ : CommRing R
inst✝¹⁴ : CommRing S
inst✝¹³ : Algebra R S
M : Type u_1
inst✝¹² : AddCommGroup M
inst✝¹¹ : Module R M
inst✝¹⁰ : Module S M
inst✝⁹ : IsScalarTower R S M
A : Type u_2
B : Type u_3
inst✝⁸ : CommRing A
inst✝⁷ : CommRing B
inst✝⁶ : Algebra R A
inst✝⁵ : Algebra R B
inst✝⁴ : Algebra A B
inst✝³ : Algebra S B
inst✝² : IsScalarTower R A B
inst✝¹ : IsScalarTower R S B
inst✝ : SMulCommClass S A B
x : B
y : Ω[A⁄R]
| (mapBaseChange R A B) (x ⊗ₜ[A] y)

Next tactic:
rw [← mul_one x, ← smul_eq_mul, ← TensorProduct.smul_tmul', LinearMap.map_smul]
@[simp]
theorem KaehlerDifferential.mapBaseChange_tmul (x : B) (y : Ω[A⁄R]) :
    KaehlerDifferential.mapBaseChange R A B (x ⊗ₜ y) = x • KaehlerDifferential.map R R A B y := by
  conv_lhs => rw [← mul_one x, ← smul_eq_mul, ← TensorProduct.smul_tmul', LinearMap.map_smul]
  

Proof state:
R : Type u
S : Type v
inst✝¹⁵ : CommRing R
inst✝¹⁴ : CommRing S
inst✝¹³ : Algebra R S
M : Type u_1
inst✝¹² : AddCommGroup M
inst✝¹¹ : Module R M
inst✝¹⁰ : Module S M
inst✝⁹ : IsScalarTower R S M
A : Type u_2
B : Type u_3
inst✝⁸ : CommRing A
inst✝⁷ : CommRing B
inst✝⁶ : Algebra R A
inst✝⁵ : Algebra R B
inst✝⁴ : Algebra A B
inst✝³ : Algebra S B
inst✝² : IsScalarTower R A B
inst✝¹ : IsScalarTower R S B
inst✝ : SMulCommClass S A B
x : B
y : Ω[A⁄R]
⊢ x • (mapBaseChange R A B) (1 ⊗ₜ[A] y) = x • (map R R A B) y

Next tactic:
congr 1
@[simp]
theorem KaehlerDifferential.mapBaseChange_tmul (x : B) (y : Ω[A⁄R]) :
    KaehlerDifferential.mapBaseChange R A B (x ⊗ₜ y) = x • KaehlerDifferential.map R R A B y := by
  conv_lhs => rw [← mul_one x, ← smul_eq_mul, ← TensorProduct.smul_tmul', LinearMap.map_smul]
  congr 1
  

Proof state:
case e_a
R : Type u
S : Type v
inst✝¹⁵ : CommRing R
inst✝¹⁴ : CommRing S
inst✝¹³ : Algebra R S
M : Type u_1
inst✝¹² : AddCommGroup M
inst✝¹¹ : Module R M
inst✝¹⁰ : Module S M
inst✝⁹ : IsScalarTower R S M
A : Type u_2
B : Type u_3
inst✝⁸ : CommRing A
inst✝⁷ : CommRing B
inst✝⁶ : Algebra R A
inst✝⁵ : Algebra R B
inst✝⁴ : Algebra A B
inst✝³ : Algebra S B
inst✝² : IsScalarTower R A B
inst✝¹ : IsScalarTower R S B
inst✝ : SMulCommClass S A B
x : B
y : Ω[A⁄R]
⊢ (mapBaseChange R A B) (1 ⊗ₜ[A] y) = (map R R A B) y

Next tactic:
exact IsBaseChange.lift_eq _ _ _
theorem real_smul_eq_coe_smul [AddCommGroup E] [Module K E] [Module ℝ E] [IsScalarTower ℝ K E]
    (r : ℝ) (x : E) : r • x = (r : K) • x := by 

Proof state:
K : Type u_1
E : Type u_2
inst✝⁴ : IsROrC K
inst✝³ : AddCommGroup E
inst✝² : Module K E
inst✝¹ : Module ℝ E
inst✝ : IsScalarTower ℝ K E
r : ℝ
x : E
⊢ r • x = ↑r • x

Next tactic:
rw [IsROrC.ofReal_alg, smul_one_smul]
@[simp, isROrC_simps]
theorem one_re : re (1 : K) = 1 := by 

Proof state:
K : Type u_1
E : Type u_2
inst✝ : IsROrC K
⊢ re 1 = 1

Next tactic:
rw [← ofReal_one, ofReal_re]
@[simp, isROrC_simps]
theorem one_im : im (1 : K) = 0 := by 

Proof state:
K : Type u_1
E : Type u_2
inst✝ : IsROrC K
⊢ im 1 = 0

Next tactic:
rw [← ofReal_one, ofReal_im]
set_option linter.deprecated false in
@[deprecated, simp, isROrC_simps]
theorem bit1_re (z : K) : re (bit1 z) = bit1 (re z) := by 

Proof state:
K : Type u_1
E : Type u_2
inst✝ : IsROrC K
z : K
⊢ re (bit1 z) = bit1 (re z)

Next tactic:
simp only [bit1, map_add, bit0_re, one_re]
set_option linter.deprecated false in
@[deprecated, simp, isROrC_simps]
theorem bit1_im (z : K) : im (bit1 z) = bit0 (im z) := by
  

Proof state:
K : Type u_1
E : Type u_2
inst✝ : IsROrC K
z : K
⊢ im (bit1 z) = bit0 (im z)

Next tactic:
simp only [bit1, map_add, bit0_im, one_im, add_zero]
@[isROrC_simps]
theorem ofReal_mul_re (r : ℝ) (z : K) : re (↑r * z) = r * re z := by
  

Proof state:
K : Type u_1
E : Type u_2
inst✝ : IsROrC K
r : ℝ
z : K
⊢ re (↑r * z) = r * re z

Next tactic:
simp only [mul_re, ofReal_im, zero_mul, ofReal_re, sub_zero]
@[isROrC_simps]
theorem ofReal_mul_im (r : ℝ) (z : K) : im (↑r * z) = r * im z := by
  

Proof state:
K : Type u_1
E : Type u_2
inst✝ : IsROrC K
r : ℝ
z : K
⊢ im (↑r * z) = r * im z

Next tactic:
simp only [add_zero, ofReal_im, zero_mul, ofReal_re, mul_im]
@[isROrC_simps]
theorem smul_re (r : ℝ) (z : K) : re (r • z) = r * re z := by
  

Proof state:
K : Type u_1
E : Type u_2
inst✝ : IsROrC K
r : ℝ
z : K
⊢ re (r • z) = r * re z

Next tactic:
rw [real_smul_eq_coe_mul, ofReal_mul_re]
@[isROrC_simps]
theorem smul_im (r : ℝ) (z : K) : im (r • z) = r * im z := by
  

Proof state:
K : Type u_1
E : Type u_2
inst✝ : IsROrC K
r : ℝ
z : K
⊢ im (r • z) = r * im z

Next tactic:
rw [real_smul_eq_coe_mul, ofReal_mul_im]