[GOAL]
X Y : Scheme
f : X ⟶ Y
⊢ @UniversallyClosed = universally (topologically @IsClosedMap)
[PROOFSTEP]
ext X Y f
[GOAL]
case h.h.h.a
X✝ Y✝ : Scheme
f✝ : X✝ ⟶ Y✝
X Y : Scheme
f : X ⟶ Y
⊢ UniversallyClosed f ↔ universally (topologically @IsClosedMap) f
[PROOFSTEP]
rw [UniversallyClosed_iff]
[GOAL]
X Y : Scheme
f : X ⟶ Y
⊢ StableUnderComposition @UniversallyClosed
[PROOFSTEP]
rw [universallyClosed_eq]
[GOAL]
X Y : Scheme
f : X ⟶ Y
⊢ StableUnderComposition (universally (topologically @IsClosedMap))
[PROOFSTEP]
exact StableUnderComposition.universally (fun X Y Z f g hf hg => @IsClosedMap.comp _ _ _ _ _ _ g.1.base f.1.base hg hf)
[GOAL]
X Y : Scheme
f : X ⟶ Y
⊢ PropertyIsLocalAtTarget @UniversallyClosed
[PROOFSTEP]
rw [universallyClosed_eq]
[GOAL]
X Y : Scheme
f : X ⟶ Y
⊢ PropertyIsLocalAtTarget (universally (topologically @IsClosedMap))
[PROOFSTEP]
apply universallyIsLocalAtTargetOfMorphismRestrict
[GOAL]
case hP₁
X Y : Scheme
f : X ⟶ Y
⊢ RespectsIso (topologically @IsClosedMap)
[PROOFSTEP]
exact
  StableUnderComposition.respectsIso (fun X Y Z f g hf hg => @IsClosedMap.comp _ _ _ _ _ _ g.1.base f.1.base hg hf)
    (fun f => (TopCat.homeoOfIso (Scheme.forgetToTop.mapIso f)).isClosedMap)
[GOAL]
case hP₂
X Y : Scheme
f : X ⟶ Y
⊢ ∀ {X Y : Scheme} (f : X ⟶ Y) {ι : Type u_1} (U : ι → Opens ↑↑Y.toPresheafedSpace),
    iSup U = ⊤ → (∀ (i : ι), topologically (@IsClosedMap) (f ∣_ U i)) → topologically (@IsClosedMap) f
[PROOFSTEP]
intro X Y f ι U hU H
[GOAL]
case hP₂
X✝ Y✝ : Scheme
f✝ : X✝ ⟶ Y✝
X Y : Scheme
f : X ⟶ Y
ι : Type u_1
U : ι → Opens ↑↑Y.toPresheafedSpace
hU : iSup U = ⊤
H : ∀ (i : ι), topologically (@IsClosedMap) (f ∣_ U i)
⊢ topologically (@IsClosedMap) f
[PROOFSTEP]
simp_rw [topologically, morphismRestrict_base] at H
[GOAL]
case hP₂
X✝ Y✝ : Scheme
f✝ : X✝ ⟶ Y✝
X Y : Scheme
f : X ⟶ Y
ι : Type u_1
U : ι → Opens ↑↑Y.toPresheafedSpace
hU : iSup U = ⊤
H : ∀ (i : ι), IsClosedMap (Set.restrictPreimage (U i).carrier ↑f.val.base)
⊢ topologically (@IsClosedMap) f
[PROOFSTEP]
exact (isClosedMap_iff_isClosedMap_of_iSup_eq_top hU).mpr H


[GOAL]
α : Type u_1
n : ℕ
p q : Partition n
⊢ Decidable (p = q)
[PROOFSTEP]
simp [Partition.ext_iff]
[GOAL]
α : Type u_1
n : ℕ
p q : Partition n
⊢ Decidable (p.parts = q.parts)
[PROOFSTEP]
exact decidableEq p.parts q.parts
[GOAL]
α : Type u_1
n : ℕ
c : Composition n
⊢ sum ↑c.blocks = n
[PROOFSTEP]
rw [Multiset.coe_sum, c.blocks_sum]
[GOAL]
α : Type u_1
n : ℕ
⊢ Function.Surjective (ofComposition n)
[PROOFSTEP]
rintro ⟨b, hb₁, hb₂⟩
[GOAL]
case mk
α : Type u_1
n : ℕ
b : Multiset ℕ
hb₁ : ∀ {i : ℕ}, i ∈ b → 0 < i
hb₂ : sum b = n
⊢ ∃ a, ofComposition n a = { parts := b, parts_pos := hb₁, parts_sum := hb₂ }
[PROOFSTEP]
rcases Quotient.exists_rep b with ⟨b, rfl⟩
[GOAL]
case mk.intro
α : Type u_1
n : ℕ
b : List ℕ
hb₁ : ∀ {i : ℕ}, i ∈ Quotient.mk (List.isSetoid ℕ) b → 0 < i
hb₂ : sum (Quotient.mk (List.isSetoid ℕ) b) = n
⊢ ∃ a, ofComposition n a = { parts := Quotient.mk (List.isSetoid ℕ) b, parts_pos := hb₁, parts_sum := hb₂ }
[PROOFSTEP]
refine' ⟨⟨b, fun {i} hi => hb₁ hi, _⟩, Partition.ext _ _ rfl⟩
[GOAL]
case mk.intro
α : Type u_1
n : ℕ
b : List ℕ
hb₁ : ∀ {i : ℕ}, i ∈ Quotient.mk (List.isSetoid ℕ) b → 0 < i
hb₂ : sum (Quotient.mk (List.isSetoid ℕ) b) = n
⊢ List.sum b = n
[PROOFSTEP]
simpa using hb₂
[GOAL]
α : Type u_1
n : ℕ
l : Multiset ℕ
hl : sum l = n
i : ℕ
hi : i ∈ filter (fun x => x ≠ 0) l
⊢ i ≠ 0
[PROOFSTEP]
apply of_mem_filter hi
[GOAL]
α : Type u_1
n : ℕ
l : Multiset ℕ
hl : sum l = n
⊢ sum (filter (fun x => x ≠ 0) l) = n
[PROOFSTEP]
have lt : l.filter (· = 0) + l.filter (· ≠ 0) = l := filter_add_not _ l
[GOAL]
α : Type u_1
n : ℕ
l : Multiset ℕ
hl : sum l = n
lt : filter (fun x => x = 0) l + filter (fun x => x ≠ 0) l = l
⊢ sum (filter (fun x => x ≠ 0) l) = n
[PROOFSTEP]
apply_fun Multiset.sum at lt
[GOAL]
α : Type u_1
n : ℕ
l : Multiset ℕ
hl : sum l = n
lt : sum (filter (fun x => x = 0) l + filter (fun x => x ≠ 0) l) = sum l
⊢ sum (filter (fun x => x ≠ 0) l) = n
[PROOFSTEP]
have lz : (l.filter (· = 0)).sum = 0 := by
  rw [Multiset.sum_eq_zero_iff]
  simp
[GOAL]
α : Type u_1
n : ℕ
l : Multiset ℕ
hl : sum l = n
lt : sum (filter (fun x => x = 0) l + filter (fun x => x ≠ 0) l) = sum l
⊢ sum (filter (fun x => x = 0) l) = 0
[PROOFSTEP]
rw [Multiset.sum_eq_zero_iff]
[GOAL]
α : Type u_1
n : ℕ
l : Multiset ℕ
hl : sum l = n
lt : sum (filter (fun x => x = 0) l + filter (fun x => x ≠ 0) l) = sum l
⊢ ∀ (x : ℕ), x ∈ filter (fun x => x = 0) l → x = 0
[PROOFSTEP]
simp
[GOAL]
α : Type u_1
n : ℕ
l : Multiset ℕ
hl : sum l = n
lt : sum (filter (fun x => x = 0) l + filter (fun x => x ≠ 0) l) = sum l
lz : sum (filter (fun x => x = 0) l) = 0
⊢ sum (filter (fun x => x ≠ 0) l) = n
[PROOFSTEP]
rwa [sum_add (filter (fun x => x = 0) l) (filter (fun x => ¬x = 0) l), lz, hl, zero_add] at lt


[GOAL]
n : ℕ
⊢ Nat.IsSqrt n (sqrt n)
[PROOFSTEP]
match n with
| 0 => simp [IsSqrt]
| 1 => simp [IsSqrt]
| n + 2 =>
  have h : ¬(n + 2) ≤ 1 := by simp
  simp only [IsSqrt, sqrt, h, ite_false]
  refine ⟨sqrt.iter_sq_le _ _, sqrt.lt_iter_succ_sq _ _ ?_⟩
  simp only [mul_add, add_mul, one_mul, mul_one, ← add_assoc]
  rw [lt_add_one_iff, add_assoc, ← mul_two]
  refine le_trans (div_add_mod' (n + 2) 2).ge ?_
  rw [add_comm, add_le_add_iff_right, add_mod_right]
  simp only [zero_lt_two, add_div_right, succ_mul_succ_eq]
  refine le_trans (b := 1) ?_ ?_
  · exact (lt_succ.1 $ mod_lt n zero_lt_two)
  · simp only [le_add_iff_nonneg_left]; exact zero_le _
[GOAL]
n : ℕ
⊢ Nat.IsSqrt 0 (sqrt 0)
[PROOFSTEP]
simp [IsSqrt]
[GOAL]
n : ℕ
⊢ Nat.IsSqrt 1 (sqrt 1)
[PROOFSTEP]
simp [IsSqrt]
[GOAL]
n✝ n : ℕ
⊢ Nat.IsSqrt (n + 2) (sqrt (n + 2))
[PROOFSTEP]
have h : ¬(n + 2) ≤ 1 := by simp
[GOAL]
n✝ n : ℕ
⊢ ¬n + 2 ≤ 1
[PROOFSTEP]
simp
[GOAL]
n✝ n : ℕ
h : ¬n + 2 ≤ 1
⊢ Nat.IsSqrt (n + 2) (sqrt (n + 2))
[PROOFSTEP]
simp only [IsSqrt, sqrt, h, ite_false]
[GOAL]
n✝ n : ℕ
h : ¬n + 2 ≤ 1
⊢ sqrt.iter (n + 2) ((n + 2) / 2) * sqrt.iter (n + 2) ((n + 2) / 2) ≤ n + 2 ∧
    n + 2 < (sqrt.iter (n + 2) ((n + 2) / 2) + 1) * (sqrt.iter (n + 2) ((n + 2) / 2) + 1)
[PROOFSTEP]
refine ⟨sqrt.iter_sq_le _ _, sqrt.lt_iter_succ_sq _ _ ?_⟩
[GOAL]
n✝ n : ℕ
h : ¬n + 2 ≤ 1
⊢ n + 2 < ((n + 2) / 2 + 1) * ((n + 2) / 2 + 1)
[PROOFSTEP]
simp only [mul_add, add_mul, one_mul, mul_one, ← add_assoc]
[GOAL]
n✝ n : ℕ
h : ¬n + 2 ≤ 1
⊢ n + 2 < (n + 2) / 2 * ((n + 2) / 2) + (n + 2) / 2 + (n + 2) / 2 + 1
[PROOFSTEP]
rw [lt_add_one_iff, add_assoc, ← mul_two]
[GOAL]
n✝ n : ℕ
h : ¬n + 2 ≤ 1
⊢ n + 2 ≤ (n + 2) / 2 * ((n + 2) / 2) + (n + 2) / 2 * 2
[PROOFSTEP]
refine le_trans (div_add_mod' (n + 2) 2).ge ?_
[GOAL]
n✝ n : ℕ
h : ¬n + 2 ≤ 1
⊢ (n + 2) / 2 * 2 + (n + 2) % 2 ≤ (n + 2) / 2 * ((n + 2) / 2) + (n + 2) / 2 * 2
[PROOFSTEP]
rw [add_comm, add_le_add_iff_right, add_mod_right]
[GOAL]
n✝ n : ℕ
h : ¬n + 2 ≤ 1
⊢ n % 2 ≤ (n + 2) / 2 * ((n + 2) / 2)
[PROOFSTEP]
simp only [zero_lt_two, add_div_right, succ_mul_succ_eq]
[GOAL]
n✝ n : ℕ
h : ¬n + 2 ≤ 1
⊢ n % 2 ≤ n / 2 * (n / 2) + n / 2 + n / 2 + 1
[PROOFSTEP]
refine le_trans (b := 1) ?_ ?_
[GOAL]
case refine_1
n✝ n : ℕ
h : ¬n + 2 ≤ 1
⊢ n % 2 ≤ 1
[PROOFSTEP]
exact (lt_succ.1 $ mod_lt n zero_lt_two)
[GOAL]
case refine_2
n✝ n : ℕ
h : ¬n + 2 ≤ 1
⊢ 1 ≤ n / 2 * (n / 2) + n / 2 + n / 2 + 1
[PROOFSTEP]
simp only [le_add_iff_nonneg_left]
[GOAL]
case refine_2
n✝ n : ℕ
h : ¬n + 2 ≤ 1
⊢ 0 ≤ n / 2 * (n / 2) + n / 2 + n / 2
[PROOFSTEP]
exact zero_le _
[GOAL]
n : ℕ
⊢ n ≤ sqrt n * sqrt n + sqrt n + sqrt n
[PROOFSTEP]
rw [← succ_mul]
[GOAL]
n : ℕ
⊢ n ≤ succ (sqrt n) * sqrt n + sqrt n
[PROOFSTEP]
exact le_of_lt_succ (lt_succ_sqrt n)
[GOAL]
m n : ℕ
⊢ m ≤ sqrt n ↔ m ^ 2 ≤ n
[PROOFSTEP]
simpa only [pow_two] using le_sqrt
[GOAL]
n : ℕ
h : sqrt n = 0
⊢ sqrt n < 1
[PROOFSTEP]
rw [h]
[GOAL]
n : ℕ
h : sqrt n = 0
⊢ 0 < 1
[PROOFSTEP]
decide
[GOAL]
n : ℕ
⊢ n = 0 → sqrt n = 0
[PROOFSTEP]
rintro rfl
[GOAL]
⊢ sqrt 0 = 0
[PROOFSTEP]
simp
[GOAL]
n q : ℕ
⊢ q = sqrt n ↔ q ^ 2 ≤ n ∧ n < (q + 1) ^ 2
[PROOFSTEP]
simpa only [pow_two] using eq_sqrt
[GOAL]
n : ℕ
h : sqrt n = 1
⊢ sqrt n < 2
[PROOFSTEP]
rw [h]
[GOAL]
n : ℕ
h : sqrt n = 1
⊢ 1 < 2
[PROOFSTEP]
decide
[GOAL]
n : ℕ
h : 1 < n
⊢ n < n * n
[PROOFSTEP]
have := Nat.mul_lt_mul_of_pos_left h (lt_of_succ_lt h)
[GOAL]
n : ℕ
h : 1 < n
this : n * 1 < n * n
⊢ n < n * n
[PROOFSTEP]
rwa [mul_one] at this
[GOAL]
n a : ℕ
h : a ≤ n + n
⊢ n * n + a < succ n * succ n
[PROOFSTEP]
rw [succ_mul, mul_succ, add_succ, add_assoc]
[GOAL]
n a : ℕ
h : a ≤ n + n
⊢ n * n + a < succ (n * n + (n + n))
[PROOFSTEP]
exact lt_succ_of_le (Nat.add_le_add_left h _)
[GOAL]
n : ℕ
⊢ sqrt n * sqrt n + sqrt n ≤ Nat.mul (succ (succ (sqrt n))) (succ (sqrt n))
[PROOFSTEP]
refine' add_le_add (Nat.mul_le_mul_right _ _) _
[GOAL]
case refine'_1
n : ℕ
⊢ sqrt n ≤ succ (succ (sqrt n))
[PROOFSTEP]
exact Nat.le_add_right _ 2
[GOAL]
case refine'_2
n : ℕ
⊢ sqrt n ≤ succ (succ (sqrt n))
[PROOFSTEP]
exact Nat.le_add_right _ 2
[GOAL]
x : ℕ
x✝ : ∃ n, n * n = x
n : ℕ
hn : n * n = x
⊢ sqrt x * sqrt x = x
[PROOFSTEP]
rw [← hn, sqrt_eq]
[GOAL]
x : ℕ
⊢ (∃ n, n ^ 2 = x) ↔ sqrt x ^ 2 = x
[PROOFSTEP]
simpa only [pow_two] using exists_mul_self x
[GOAL]
n m : ℕ
hl : m * m < n
hr : n < (m + 1) * (m + 1)
⊢ ¬∃ t, t * t = n
[PROOFSTEP]
rintro ⟨t, rfl⟩
[GOAL]
case intro
m t : ℕ
hl : m * m < t * t
hr : t * t < (m + 1) * (m + 1)
⊢ False
[PROOFSTEP]
have h1 : m < t := Nat.mul_self_lt_mul_self_iff.mpr hl
[GOAL]
case intro
m t : ℕ
hl : m * m < t * t
hr : t * t < (m + 1) * (m + 1)
h1 : m < t
⊢ False
[PROOFSTEP]
have h2 : t < m + 1 := Nat.mul_self_lt_mul_self_iff.mpr hr
[GOAL]
case intro
m t : ℕ
hl : m * m < t * t
hr : t * t < (m + 1) * (m + 1)
h1 : m < t
h2 : t < m + 1
⊢ False
[PROOFSTEP]
exact (not_lt_of_ge <| le_of_lt_succ h2) h1
[GOAL]
n m : ℕ
hl : m ^ 2 < n
hr : n < (m + 1) ^ 2
⊢ ¬∃ t, t ^ 2 = n
[PROOFSTEP]
simpa only [pow_two] using not_exists_sq (by simpa only [pow_two] using hl) (by simpa only [pow_two] using hr)
[GOAL]
n m : ℕ
hl : m ^ 2 < n
hr : n < (m + 1) ^ 2
⊢ ?m.11228 * ?m.11228 < n
[PROOFSTEP]
simpa only [pow_two] using hl
[GOAL]
n m : ℕ
hl : m ^ 2 < n
hr : n < (m + 1) ^ 2
⊢ n < (m + 1) * (m + 1)
[PROOFSTEP]
simpa only [pow_two] using hr


[GOAL]
n : ℕ
i : Fin n
M : Type u_1
inst✝ : Zero M
y : M
t : Fin (n + 1) →₀ M
s : Fin n →₀ M
k : Fin n
⊢ ↑(tail (cons y s)) k = ↑s k
[PROOFSTEP]
simp only [tail_apply, cons_succ]
[GOAL]
n : ℕ
i : Fin n
M : Type u_1
inst✝ : Zero M
y : M
t : Fin (n + 1) →₀ M
s : Fin n →₀ M
⊢ cons (↑t 0) (tail t) = t
[PROOFSTEP]
ext a
[GOAL]
case h
n : ℕ
i : Fin n
M : Type u_1
inst✝ : Zero M
y : M
t : Fin (n + 1) →₀ M
s : Fin n →₀ M
a : Fin (n + 1)
⊢ ↑(cons (↑t 0) (tail t)) a = ↑t a
[PROOFSTEP]
by_cases c_a : a = 0
[GOAL]
case pos
n : ℕ
i : Fin n
M : Type u_1
inst✝ : Zero M
y : M
t : Fin (n + 1) →₀ M
s : Fin n →₀ M
a : Fin (n + 1)
c_a : a = 0
⊢ ↑(cons (↑t 0) (tail t)) a = ↑t a
[PROOFSTEP]
rw [c_a, cons_zero]
[GOAL]
case neg
n : ℕ
i : Fin n
M : Type u_1
inst✝ : Zero M
y : M
t : Fin (n + 1) →₀ M
s : Fin n →₀ M
a : Fin (n + 1)
c_a : ¬a = 0
⊢ ↑(cons (↑t 0) (tail t)) a = ↑t a
[PROOFSTEP]
rw [← Fin.succ_pred a c_a, cons_succ, ← tail_apply]
[GOAL]
n : ℕ
i : Fin n
M : Type u_1
inst✝ : Zero M
y : M
t : Fin (n + 1) →₀ M
s : Fin n →₀ M
⊢ cons 0 0 = 0
[PROOFSTEP]
ext a
[GOAL]
case h
n : ℕ
i : Fin n
M : Type u_1
inst✝ : Zero M
y : M
t : Fin (n + 1) →₀ M
s : Fin n →₀ M
a : Fin (n + 1)
⊢ ↑(cons 0 0) a = ↑0 a
[PROOFSTEP]
by_cases c : a = 0
[GOAL]
case pos
n : ℕ
i : Fin n
M : Type u_1
inst✝ : Zero M
y : M
t : Fin (n + 1) →₀ M
s : Fin n →₀ M
a : Fin (n + 1)
c : a = 0
⊢ ↑(cons 0 0) a = ↑0 a
[PROOFSTEP]
simp [c]
[GOAL]
case neg
n : ℕ
i : Fin n
M : Type u_1
inst✝ : Zero M
y : M
t : Fin (n + 1) →₀ M
s : Fin n →₀ M
a : Fin (n + 1)
c : ¬a = 0
⊢ ↑(cons 0 0) a = ↑0 a
[PROOFSTEP]
rw [← Fin.succ_pred a c, cons_succ]
[GOAL]
case neg
n : ℕ
i : Fin n
M : Type u_1
inst✝ : Zero M
y : M
t : Fin (n + 1) →₀ M
s : Fin n →₀ M
a : Fin (n + 1)
c : ¬a = 0
⊢ ↑0 (Fin.pred a c) = ↑0 (Fin.succ (Fin.pred a c))
[PROOFSTEP]
simp
[GOAL]
n : ℕ
i : Fin n
M : Type u_1
inst✝ : Zero M
y : M
t : Fin (n + 1) →₀ M
s : Fin n →₀ M
h : y ≠ 0
⊢ cons y s ≠ 0
[PROOFSTEP]
contrapose! h with c
[GOAL]
n : ℕ
i : Fin n
M : Type u_1
inst✝ : Zero M
y : M
t : Fin (n + 1) →₀ M
s : Fin n →₀ M
c : cons y s = 0
⊢ y = 0
[PROOFSTEP]
rw [← cons_zero y s, c, Finsupp.coe_zero, Pi.zero_apply]
[GOAL]
n : ℕ
i : Fin n
M : Type u_1
inst✝ : Zero M
y : M
t : Fin (n + 1) →₀ M
s : Fin n →₀ M
h : s ≠ 0
⊢ cons y s ≠ 0
[PROOFSTEP]
contrapose! h with c
[GOAL]
n : ℕ
i : Fin n
M : Type u_1
inst✝ : Zero M
y : M
t : Fin (n + 1) →₀ M
s : Fin n →₀ M
c : cons y s = 0
⊢ s = 0
[PROOFSTEP]
ext a
[GOAL]
case h
n : ℕ
i : Fin n
M : Type u_1
inst✝ : Zero M
y : M
t : Fin (n + 1) →₀ M
s : Fin n →₀ M
c : cons y s = 0
a : Fin n
⊢ ↑s a = ↑0 a
[PROOFSTEP]
simp [← cons_succ a y s, c]
[GOAL]
n : ℕ
i : Fin n
M : Type u_1
inst✝ : Zero M
y : M
t : Fin (n + 1) →₀ M
s : Fin n →₀ M
⊢ cons y s ≠ 0 ↔ y ≠ 0 ∨ s ≠ 0
[PROOFSTEP]
refine' ⟨fun h => _, fun h => h.casesOn cons_ne_zero_of_left cons_ne_zero_of_right⟩
[GOAL]
n : ℕ
i : Fin n
M : Type u_1
inst✝ : Zero M
y : M
t : Fin (n + 1) →₀ M
s : Fin n →₀ M
h : cons y s ≠ 0
⊢ y ≠ 0 ∨ s ≠ 0
[PROOFSTEP]
refine' imp_iff_not_or.1 fun h' c => h _
[GOAL]
n : ℕ
i : Fin n
M : Type u_1
inst✝ : Zero M
y : M
t : Fin (n + 1) →₀ M
s : Fin n →₀ M
h : cons y s ≠ 0
h' : y = 0
c : s = 0
⊢ cons y s = 0
[PROOFSTEP]
rw [h', c, Finsupp.cons_zero_zero]


[GOAL]
R : Type u_1
inst✝⁴ : Semiring R
C : Type u_2
D : Type u_3
inst✝³ : Category.{?u.87, u_2} C
inst✝² : Category.{?u.91, u_3} D
inst✝¹ : Preadditive D
inst✝ : Linear R D
F G : C ⥤ D
r : R
α : F ⟶ G
⊢ ∀ ⦃X Y : C⦄ (f : X ⟶ Y), F.map f ≫ (fun X => r • NatTrans.app α X) Y = (fun X => r • NatTrans.app α X) X ≫ G.map f
[PROOFSTEP]
intros
[GOAL]
R : Type u_1
inst✝⁴ : Semiring R
C : Type u_2
D : Type u_3
inst✝³ : Category.{?u.87, u_2} C
inst✝² : Category.{?u.91, u_3} D
inst✝¹ : Preadditive D
inst✝ : Linear R D
F G : C ⥤ D
r : R
α : F ⟶ G
X✝ Y✝ : C
f✝ : X✝ ⟶ Y✝
⊢ F.map f✝ ≫ (fun X => r • NatTrans.app α X) Y✝ = (fun X => r • NatTrans.app α X) X✝ ≫ G.map f✝
[PROOFSTEP]
rw [comp_smul, smul_comp, α.naturality]
[GOAL]
R : Type u_1
inst✝⁴ : Semiring R
C : Type u_2
D : Type u_3
inst✝³ : Category.{?u.87, u_2} C
inst✝² : Category.{?u.91, u_3} D
inst✝¹ : Preadditive D
inst✝ : Linear R D
F G : C ⥤ D
⊢ ∀ (b : F ⟶ G), 1 • b = b
[PROOFSTEP]
intros
[GOAL]
R : Type u_1
inst✝⁴ : Semiring R
C : Type u_2
D : Type u_3
inst✝³ : Category.{?u.87, u_2} C
inst✝² : Category.{?u.91, u_3} D
inst✝¹ : Preadditive D
inst✝ : Linear R D
F G : C ⥤ D
b✝ : F ⟶ G
⊢ 1 • b✝ = b✝
[PROOFSTEP]
ext
[GOAL]
case w.h
R : Type u_1
inst✝⁴ : Semiring R
C : Type u_2
D : Type u_3
inst✝³ : Category.{?u.87, u_2} C
inst✝² : Category.{?u.91, u_3} D
inst✝¹ : Preadditive D
inst✝ : Linear R D
F G : C ⥤ D
b✝ : F ⟶ G
x✝ : C
⊢ NatTrans.app (1 • b✝) x✝ = NatTrans.app b✝ x✝
[PROOFSTEP]
apply one_smul
[GOAL]
R : Type u_1
inst✝⁴ : Semiring R
C : Type u_2
D : Type u_3
inst✝³ : Category.{?u.87, u_2} C
inst✝² : Category.{?u.91, u_3} D
inst✝¹ : Preadditive D
inst✝ : Linear R D
F G : C ⥤ D
⊢ ∀ (x y : R) (b : F ⟶ G), (x * y) • b = x • y • b
[PROOFSTEP]
intros
[GOAL]
R : Type u_1
inst✝⁴ : Semiring R
C : Type u_2
D : Type u_3
inst✝³ : Category.{?u.87, u_2} C
inst✝² : Category.{?u.91, u_3} D
inst✝¹ : Preadditive D
inst✝ : Linear R D
F G : C ⥤ D
x✝ y✝ : R
b✝ : F ⟶ G
⊢ (x✝ * y✝) • b✝ = x✝ • y✝ • b✝
[PROOFSTEP]
ext
[GOAL]
case w.h
R : Type u_1
inst✝⁴ : Semiring R
C : Type u_2
D : Type u_3
inst✝³ : Category.{?u.87, u_2} C
inst✝² : Category.{?u.91, u_3} D
inst✝¹ : Preadditive D
inst✝ : Linear R D
F G : C ⥤ D
x✝¹ y✝ : R
b✝ : F ⟶ G
x✝ : C
⊢ NatTrans.app ((x✝¹ * y✝) • b✝) x✝ = NatTrans.app (x✝¹ • y✝ • b✝) x✝
[PROOFSTEP]
apply mul_smul
[GOAL]
R : Type u_1
inst✝⁴ : Semiring R
C : Type u_2
D : Type u_3
inst✝³ : Category.{?u.87, u_2} C
inst✝² : Category.{?u.91, u_3} D
inst✝¹ : Preadditive D
inst✝ : Linear R D
F G : C ⥤ D
⊢ ∀ (a : R), a • 0 = 0
[PROOFSTEP]
intros
[GOAL]
R : Type u_1
inst✝⁴ : Semiring R
C : Type u_2
D : Type u_3
inst✝³ : Category.{?u.87, u_2} C
inst✝² : Category.{?u.91, u_3} D
inst✝¹ : Preadditive D
inst✝ : Linear R D
F G : C ⥤ D
a✝ : R
⊢ a✝ • 0 = 0
[PROOFSTEP]
ext
[GOAL]
case w.h
R : Type u_1
inst✝⁴ : Semiring R
C : Type u_2
D : Type u_3
inst✝³ : Category.{?u.87, u_2} C
inst✝² : Category.{?u.91, u_3} D
inst✝¹ : Preadditive D
inst✝ : Linear R D
F G : C ⥤ D
a✝ : R
x✝ : C
⊢ NatTrans.app (a✝ • 0) x✝ = NatTrans.app 0 x✝
[PROOFSTEP]
apply smul_zero
[GOAL]
R : Type u_1
inst✝⁴ : Semiring R
C : Type u_2
D : Type u_3
inst✝³ : Category.{?u.87, u_2} C
inst✝² : Category.{?u.91, u_3} D
inst✝¹ : Preadditive D
inst✝ : Linear R D
F G : C ⥤ D
⊢ ∀ (a : R) (x y : F ⟶ G), a • (x + y) = a • x + a • y
[PROOFSTEP]
intros
[GOAL]
R : Type u_1
inst✝⁴ : Semiring R
C : Type u_2
D : Type u_3
inst✝³ : Category.{?u.87, u_2} C
inst✝² : Category.{?u.91, u_3} D
inst✝¹ : Preadditive D
inst✝ : Linear R D
F G : C ⥤ D
a✝ : R
x✝ y✝ : F ⟶ G
⊢ a✝ • (x✝ + y✝) = a✝ • x✝ + a✝ • y✝
[PROOFSTEP]
ext
[GOAL]
case w.h
R : Type u_1
inst✝⁴ : Semiring R
C : Type u_2
D : Type u_3
inst✝³ : Category.{?u.87, u_2} C
inst✝² : Category.{?u.91, u_3} D
inst✝¹ : Preadditive D
inst✝ : Linear R D
F G : C ⥤ D
a✝ : R
x✝¹ y✝ : F ⟶ G
x✝ : C
⊢ NatTrans.app (a✝ • (x✝¹ + y✝)) x✝ = NatTrans.app (a✝ • x✝¹ + a✝ • y✝) x✝
[PROOFSTEP]
apply smul_add
[GOAL]
R : Type u_1
inst✝⁴ : Semiring R
C : Type u_2
D : Type u_3
inst✝³ : Category.{?u.87, u_2} C
inst✝² : Category.{?u.91, u_3} D
inst✝¹ : Preadditive D
inst✝ : Linear R D
F G : C ⥤ D
⊢ ∀ (r s : R) (x : F ⟶ G), (r + s) • x = r • x + s • x
[PROOFSTEP]
intros
[GOAL]
R : Type u_1
inst✝⁴ : Semiring R
C : Type u_2
D : Type u_3
inst✝³ : Category.{?u.87, u_2} C
inst✝² : Category.{?u.91, u_3} D
inst✝¹ : Preadditive D
inst✝ : Linear R D
F G : C ⥤ D
r✝ s✝ : R
x✝ : F ⟶ G
⊢ (r✝ + s✝) • x✝ = r✝ • x✝ + s✝ • x✝
[PROOFSTEP]
ext
[GOAL]
case w.h
R : Type u_1
inst✝⁴ : Semiring R
C : Type u_2
D : Type u_3
inst✝³ : Category.{?u.87, u_2} C
inst✝² : Category.{?u.91, u_3} D
inst✝¹ : Preadditive D
inst✝ : Linear R D
F G : C ⥤ D
r✝ s✝ : R
x✝¹ : F ⟶ G
x✝ : C
⊢ NatTrans.app ((r✝ + s✝) • x✝¹) x✝ = NatTrans.app (r✝ • x✝¹ + s✝ • x✝¹) x✝
[PROOFSTEP]
apply add_smul
[GOAL]
R : Type u_1
inst✝⁴ : Semiring R
C : Type u_2
D : Type u_3
inst✝³ : Category.{?u.87, u_2} C
inst✝² : Category.{?u.91, u_3} D
inst✝¹ : Preadditive D
inst✝ : Linear R D
F G : C ⥤ D
⊢ ∀ (x : F ⟶ G), 0 • x = 0
[PROOFSTEP]
intros
[GOAL]
R : Type u_1
inst✝⁴ : Semiring R
C : Type u_2
D : Type u_3
inst✝³ : Category.{?u.87, u_2} C
inst✝² : Category.{?u.91, u_3} D
inst✝¹ : Preadditive D
inst✝ : Linear R D
F G : C ⥤ D
x✝ : F ⟶ G
⊢ 0 • x✝ = 0
[PROOFSTEP]
ext
[GOAL]
case w.h
R : Type u_1
inst✝⁴ : Semiring R
C : Type u_2
D : Type u_3
inst✝³ : Category.{?u.87, u_2} C
inst✝² : Category.{?u.91, u_3} D
inst✝¹ : Preadditive D
inst✝ : Linear R D
F G : C ⥤ D
x✝¹ : F ⟶ G
x✝ : C
⊢ NatTrans.app (0 • x✝¹) x✝ = NatTrans.app 0 x✝
[PROOFSTEP]
apply zero_smul
[GOAL]
R : Type u_1
inst✝⁴ : Semiring R
C : Type u_2
D : Type u_3
inst✝³ : Category.{?u.87, u_2} C
inst✝² : Category.{?u.91, u_3} D
inst✝¹ : Preadditive D
inst✝ : Linear R D
⊢ ∀ (X Y Z : C ⥤ D) (r : R) (f : X ⟶ Y) (g : Y ⟶ Z), (r • f) ≫ g = r • f ≫ g
[PROOFSTEP]
intros
[GOAL]
R : Type u_1
inst✝⁴ : Semiring R
C : Type u_2
D : Type u_3
inst✝³ : Category.{?u.87, u_2} C
inst✝² : Category.{?u.91, u_3} D
inst✝¹ : Preadditive D
inst✝ : Linear R D
X✝ Y✝ Z✝ : C ⥤ D
r✝ : R
f✝ : X✝ ⟶ Y✝
g✝ : Y✝ ⟶ Z✝
⊢ (r✝ • f✝) ≫ g✝ = r✝ • f✝ ≫ g✝
[PROOFSTEP]
ext
[GOAL]
case w.h
R : Type u_1
inst✝⁴ : Semiring R
C : Type u_2
D : Type u_3
inst✝³ : Category.{?u.87, u_2} C
inst✝² : Category.{?u.91, u_3} D
inst✝¹ : Preadditive D
inst✝ : Linear R D
X✝ Y✝ Z✝ : C ⥤ D
r✝ : R
f✝ : X✝ ⟶ Y✝
g✝ : Y✝ ⟶ Z✝
x✝ : C
⊢ NatTrans.app ((r✝ • f✝) ≫ g✝) x✝ = NatTrans.app (r✝ • f✝ ≫ g✝) x✝
[PROOFSTEP]
apply smul_comp
[GOAL]
R : Type u_1
inst✝⁴ : Semiring R
C : Type u_2
D : Type u_3
inst✝³ : Category.{?u.87, u_2} C
inst✝² : Category.{?u.91, u_3} D
inst✝¹ : Preadditive D
inst✝ : Linear R D
⊢ ∀ (X Y Z : C ⥤ D) (f : X ⟶ Y) (r : R) (g : Y ⟶ Z), f ≫ (r • g) = r • f ≫ g
[PROOFSTEP]
intros
[GOAL]
R : Type u_1
inst✝⁴ : Semiring R
C : Type u_2
D : Type u_3
inst✝³ : Category.{?u.87, u_2} C
inst✝² : Category.{?u.91, u_3} D
inst✝¹ : Preadditive D
inst✝ : Linear R D
X✝ Y✝ Z✝ : C ⥤ D
f✝ : X✝ ⟶ Y✝
r✝ : R
g✝ : Y✝ ⟶ Z✝
⊢ f✝ ≫ (r✝ • g✝) = r✝ • f✝ ≫ g✝
[PROOFSTEP]
ext
[GOAL]
case w.h
R : Type u_1
inst✝⁴ : Semiring R
C : Type u_2
D : Type u_3
inst✝³ : Category.{?u.87, u_2} C
inst✝² : Category.{?u.91, u_3} D
inst✝¹ : Preadditive D
inst✝ : Linear R D
X✝ Y✝ Z✝ : C ⥤ D
f✝ : X✝ ⟶ Y✝
r✝ : R
g✝ : Y✝ ⟶ Z✝
x✝ : C
⊢ NatTrans.app (f✝ ≫ (r✝ • g✝)) x✝ = NatTrans.app (r✝ • f✝ ≫ g✝) x✝
[PROOFSTEP]
apply comp_smul


[GOAL]
M : Type u_1
S T : Set M
inst✝ : MulOneClass M
⊢ 1 ∈ centralizer S
[PROOFSTEP]
simp [mem_centralizer_iff]
[GOAL]
M : Type u_1
S T : Set M
inst✝ : MulZeroClass M
⊢ 0 ∈ centralizer S
[PROOFSTEP]
simp [mem_centralizer_iff]
[GOAL]
M : Type u_1
S T : Set M
a b : M
inst✝ : Semigroup M
ha : a ∈ centralizer S
hb : b ∈ centralizer S
g : M
hg : g ∈ S
⊢ g * (a * b) = a * b * g
[PROOFSTEP]
rw [mul_assoc, ← hb g hg, ← mul_assoc, ha g hg, mul_assoc]
[GOAL]
M : Type u_1
S T : Set M
a b : M
inst✝ : Group M
ha : a ∈ centralizer S
g : M
hg : g ∈ S
⊢ g * a⁻¹ = a⁻¹ * g
[PROOFSTEP]
rw [mul_inv_eq_iff_eq_mul, mul_assoc, eq_inv_mul_iff_mul_eq, ha g hg]
[GOAL]
M : Type u_1
S T : Set M
a b : M
inst✝ : Distrib M
ha : a ∈ centralizer S
hb : b ∈ centralizer S
c : M
hc : c ∈ S
⊢ c * (a + b) = (a + b) * c
[PROOFSTEP]
rw [add_mul, mul_add, ha c hc, hb c hc]
[GOAL]
M : Type u_1
S T : Set M
a b : M
inst✝¹ : Mul M
inst✝ : HasDistribNeg M
ha : a ∈ centralizer S
c : M
hc : c ∈ S
⊢ c * -a = -a * c
[PROOFSTEP]
rw [mul_neg, ha c hc, neg_mul]
[GOAL]
M : Type u_1
S T : Set M
a b : M
inst✝ : GroupWithZero M
ha : a ∈ centralizer S
h : a = 0
⊢ a⁻¹ ∈ centralizer S
[PROOFSTEP]
rw [h, inv_zero]
[GOAL]
M : Type u_1
S T : Set M
a b : M
inst✝ : GroupWithZero M
ha : a ∈ centralizer S
h : a = 0
⊢ 0 ∈ centralizer S
[PROOFSTEP]
exact zero_mem_centralizer S
[GOAL]
M : Type u_1
S T : Set M
a b : M
inst✝ : GroupWithZero M
ha : a ∈ centralizer S
ha0 : a ≠ 0
c : M
hc : c ∈ S
⊢ c * a⁻¹ = a⁻¹ * c
[PROOFSTEP]
rw [mul_inv_eq_iff_eq_mul₀ ha0, mul_assoc, eq_inv_mul_iff_mul_eq₀ ha0, ha c hc]
[GOAL]
M : Type u_1
S T : Set M
a b : M
inst✝ : Group M
ha : a ∈ centralizer S
hb : b ∈ centralizer S
⊢ a / b ∈ centralizer S
[PROOFSTEP]
rw [div_eq_mul_inv]
[GOAL]
M : Type u_1
S T : Set M
a b : M
inst✝ : Group M
ha : a ∈ centralizer S
hb : b ∈ centralizer S
⊢ a * b⁻¹ ∈ centralizer S
[PROOFSTEP]
exact mul_mem_centralizer ha (inv_mem_centralizer hb)
[GOAL]
M : Type u_1
S T : Set M
a b : M
inst✝ : GroupWithZero M
ha : a ∈ centralizer S
hb : b ∈ centralizer S
⊢ a / b ∈ centralizer S
[PROOFSTEP]
rw [div_eq_mul_inv]
[GOAL]
M : Type u_1
S T : Set M
a b : M
inst✝ : GroupWithZero M
ha : a ∈ centralizer S
hb : b ∈ centralizer S
⊢ a * b⁻¹ ∈ centralizer S
[PROOFSTEP]
exact mul_mem_centralizer ha (inv_mem_centralizer₀ hb)