1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: MeasurableSet.exists_isCompact_diff_lt
File: Mathlib/MeasureTheory/Measure/Regular.lean

tactic: rcases hA.exists_isCompact_lt_add h'A hε with ⟨K, hKA, hKc, hK⟩
state_before: α : Type u_1
β : Type u_2
inst✝⁴ : MeasurableSpace α
inst✝³ : TopologicalSpace α
μ : Measure α
inst✝² : OpensMeasurableSpace α
inst✝¹ : T2Space α
inst✝ : μ.InnerRegularCompactLTTop
A : Set α
hA : MeasurableSet A
h'A : μ A ≠ ⊤
ε : ℝ≥0∞
hε : ε ≠ 0
⊢ ∃ K ⊆ A, IsCompact K ∧ μ (A \ K) < ε
state_after: case intro.intro.intro
α : Type u_1
β : Type u_2
inst✝⁴ : MeasurableSpace α
inst✝³ : TopologicalSpace α
μ : Measure α
inst✝² : OpensMeasurableSpace α
inst✝¹ : T2Space α
inst✝ : μ.InnerRegularCompactLTTop
A : Set α
hA : MeasurableSet A
h'A : μ A ≠ ⊤
ε : ℝ≥0∞
hε : ε ≠ 0
K : Set α
hKA : K ⊆ A
hKc : IsCompact K
hK : μ A < μ K + ε
⊢ ∃ K ⊆ A, IsCompact K ∧ μ (A \ K) < ε

tactic: exact ⟨K, hKA, hKc, measure_diff_lt_of_lt_add hKc.measurableSet hKA
  (ne_top_of_le_ne_top h'A <| measure_mono hKA) hK⟩
state_before: case intro.intro.intro
α : Type u_1
β : Type u_2
inst✝⁴ : MeasurableSpace α
inst✝³ : TopologicalSpace α
μ : Measure α
inst✝² : OpensMeasurableSpace α
inst✝¹ : T2Space α
inst✝ : μ.InnerRegularCompactLTTop
A : Set α
hA : MeasurableSet A
h'A : μ A ≠ ⊤
ε : ℝ≥0∞
hε : ε ≠ 0
K : Set α
hKA : K ⊆ A
hKc : IsCompact K
hK : μ A < μ K + ε
⊢ ∃ K ⊆ A, IsCompact K ∧ μ (A \ K) < ε
state_after: no goals
Theorem: Ordinal.opow_pos
File: Mathlib/SetTheory/Ordinal/Exponential.lean

tactic: have h0 : 0 < a ^ (0 : Ordinal) := by simp only [opow_zero, zero_lt_one]
state_before: a b : Ordinal.{u_1}
a0 : 0 < a
⊢ 0 < a ^ b
state_after: a b : Ordinal.{u_1}
a0 : 0 < a
h0 : 0 < a ^ 0
⊢ 0 < a ^ b

tactic: induction b using limitRecOn with
| H₁ => exact h0
| H₂ b IH =>
  rw [opow_succ]
  exact mul_pos IH a0
| H₃ b l _ =>
  exact (lt_opow_of_limit (Ordinal.pos_iff_ne_zero.1 a0) l).2 ⟨0, l.pos, h0⟩
state_before: a b : Ordinal.{u_1}
a0 : 0 < a
h0 : 0 < a ^ 0
⊢ 0 < a ^ b
state_after: no goals

tactic: simp only [opow_zero, zero_lt_one]
state_before: a b : Ordinal.{u_1}
a0 : 0 < a
⊢ 0 < a ^ 0
state_after: no goals

tactic: exact h0
state_before: case H₁
a : Ordinal.{u_1}
a0 : 0 < a
h0 : 0 < a ^ 0
⊢ 0 < a ^ 0
state_after: no goals

tactic: rw [opow_succ]
state_before: case H₂
a : Ordinal.{u_1}
a0 : 0 < a
h0 : 0 < a ^ 0
b : Ordinal.{u_1}
IH : 0 < a ^ b
⊢ 0 < a ^ succ b
state_after: case H₂
a : Ordinal.{u_1}
a0 : 0 < a
h0 : 0 < a ^ 0
b : Ordinal.{u_1}
IH : 0 < a ^ b
⊢ 0 < a ^ b * a

tactic: exact mul_pos IH a0
state_before: case H₂
a : Ordinal.{u_1}
a0 : 0 < a
h0 : 0 < a ^ 0
b : Ordinal.{u_1}
IH : 0 < a ^ b
⊢ 0 < a ^ b * a
state_after: no goals

tactic: exact (lt_opow_of_limit (Ordinal.pos_iff_ne_zero.1 a0) l).2 ⟨0, l.pos, h0⟩
state_before: case H₃
a : Ordinal.{u_1}
a0 : 0 < a
h0 : 0 < a ^ 0
b : Ordinal.{u_1}
l : b.IsLimit
a✝ : ∀ o' < b, 0 < a ^ o'
⊢ 0 < a ^ b
state_after: no goals
Theorem: List.pairwise_iff_coe_toFinset_pairwise
File: Mathlib/Data/Finset/Pairwise.lean

tactic: letI : IsSymm α r := ⟨hs⟩
state_before: α : Type u_1
ι : Type u_2
ι' : Type u_3
β : Type u_4
inst✝ : DecidableEq α
r : α → α → Prop
l : List α
hn : l.Nodup
hs : Symmetric r
⊢ (↑l.toFinset).Pairwise r ↔ Pairwise r l
state_after: α : Type u_1
ι : Type u_2
ι' : Type u_3
β : Type u_4
inst✝ : DecidableEq α
r : α → α → Prop
l : List α
hn : l.Nodup
hs : Symmetric r
this : IsSymm α r := { symm := hs }
⊢ (↑l.toFinset).Pairwise r ↔ Pairwise r l

tactic: rw [coe_toFinset, hn.pairwise_coe]
state_before: α : Type u_1
ι : Type u_2
ι' : Type u_3
β : Type u_4
inst✝ : DecidableEq α
r : α → α → Prop
l : List α
hn : l.Nodup
hs : Symmetric r
this : IsSymm α r := { symm := hs }
⊢ (↑l.toFinset).Pairwise r ↔ Pairwise r l
state_after: no goals
Theorem: Vector.mem_cons_iff
File: Mathlib/Data/Vector/Mem.lean

tactic: rw [Vector.toList_cons, List.mem_cons]
state_before: α : Type u_1
β : Type u_2
n : ℕ
a a' : α
v : Vector α n
⊢ a' ∈ (a ::ᵥ v).toList ↔ a' = a ∨ a' ∈ v.toList
state_after: no goals
Theorem: Set.image_neg_Icc
File: Mathlib/Data/Set/Pointwise/Interval.lean

tactic: simp
state_before: α : Type u_1
inst✝ : OrderedAddCommGroup α
a b c : α
⊢ Neg.neg '' Icc a b = Icc (-b) (-a)
state_after: no goals
Theorem: Nat.filter_dvd_eq_properDivisors
File: Mathlib/NumberTheory/Divisors.lean

tactic: ext
state_before: n : ℕ
h : n ≠ 0
⊢ filter (fun x => x ∣ n) (range n) = n.properDivisors
state_after: case a
n : ℕ
h : n ≠ 0
a✝ : ℕ
⊢ a✝ ∈ filter (fun x => x ∣ n) (range n) ↔ a✝ ∈ n.properDivisors

tactic: simp only [properDivisors, mem_filter, mem_range, mem_Ico, and_congr_left_iff, iff_and_self]
state_before: case a
n : ℕ
h : n ≠ 0
a✝ : ℕ
⊢ a✝ ∈ filter (fun x => x ∣ n) (range n) ↔ a✝ ∈ n.properDivisors
state_after: case a
n : ℕ
h : n ≠ 0
a✝ : ℕ
⊢ a✝ ∣ n → a✝ < n → 1 ≤ a✝

tactic: exact fun ha _ => succ_le_iff.mpr (pos_of_dvd_of_pos ha h.bot_lt)
state_before: case a
n : ℕ
h : n ≠ 0
a✝ : ℕ
⊢ a✝ ∣ n → a✝ < n → 1 ≤ a✝
state_after: no goals
Theorem: Ultrafilter.eventually_imp
File: Mathlib/Order/Filter/Ultrafilter.lean

tactic: simp only [imp_iff_not_or, eventually_or, eventually_not]
state_before: α : Type u
β : Type v
γ : Type u_1
f g : Ultrafilter α
s t : Set α
p q : α → Prop
⊢ (∀ᶠ (x : α) in ↑f, p x → q x) ↔ (∀ᶠ (x : α) in ↑f, p x) → ∀ᶠ (x : α) in ↑f, q x
state_after: no goals
Theorem: List.countP_eq_length_filter
File: .lake/packages/batteries/Batteries/Data/List/Count.lean

tactic: induction l with
| nil => rfl
| cons x l ih =>
  if h : p x
  then rw [countP_cons_of_pos p l h, ih, filter_cons_of_pos l h, length]
  else rw [countP_cons_of_neg p l h, ih, filter_cons_of_neg l h]
state_before: α : Type u_1
p q : α → Bool
l : List α
⊢ countP p l = (filter p l).length
state_after: no goals

tactic: rfl
state_before: case nil
α : Type u_1
p q : α → Bool
⊢ countP p [] = (filter p []).length
state_after: no goals

tactic: if h : p x
then rw [countP_cons_of_pos p l h, ih, filter_cons_of_pos l h, length]
else rw [countP_cons_of_neg p l h, ih, filter_cons_of_neg l h]
state_before: case cons
α : Type u_1
p q : α → Bool
x : α
l : List α
ih : countP p l = (filter p l).length
⊢ countP p (x :: l) = (filter p (x :: l)).length
state_after: no goals

tactic: rw [countP_cons_of_pos p l h, ih, filter_cons_of_pos l h, length]
state_before: α : Type u_1
p q : α → Bool
x : α
l : List α
ih : countP p l = (filter p l).length
h : p x = true
⊢ countP p (x :: l) = (filter p (x :: l)).length
state_after: no goals

tactic: rw [countP_cons_of_neg p l h, ih, filter_cons_of_neg l h]
state_before: α : Type u_1
p q : α → Bool
x : α
l : List α
ih : countP p l = (filter p l).length
h : ¬p x = true
⊢ countP p (x :: l) = (filter p (x :: l)).length
state_after: no goals
Theorem: Monotone.map_max
File: Mathlib/Order/MinMax.lean

tactic: rcases le_total a b with h | h <;> simp [h, hf h]
state_before: α : Type u
β : Type v
inst✝¹ : LinearOrder α
inst✝ : LinearOrder β
f : α → β
s : Set α
a b c d : α
hf : Monotone f
⊢ f (max a b) = max (f a) (f b)
state_after: no goals
Theorem: MeasureTheory.Measure.snd_univ
File: Mathlib/MeasureTheory/Constructions/Prod/Basic.lean

tactic: rw [snd_apply MeasurableSet.univ, preimage_univ]
state_before: α : Type u_1
α' : Type u_2
β : Type u_3
β' : Type u_4
γ : Type u_5
E : Type u_6
inst✝⁶ : MeasurableSpace α
inst✝⁵ : MeasurableSpace α'
inst✝⁴ : MeasurableSpace β
inst✝³ : MeasurableSpace β'
inst✝² : MeasurableSpace γ
μ μ' : Measure α
ν ν' : Measure β
τ : Measure γ
inst✝¹ : NormedAddCommGroup E
inst✝ : SFinite ν
ρ : Measure (α × β)
⊢ ρ.snd univ = ρ univ
state_after: no goals
Theorem: Subalgebra.star_adjoin_comm
File: Mathlib/Algebra/Star/Subalgebra.lean

tactic: simpa only [star_star] using Subalgebra.star_mono (this (star s))
state_before: F : Type u_1
R : Type u_2
A : Type u_3
B : Type u_4
inst✝⁹ : CommSemiring R
inst✝⁸ : StarRing R
inst✝⁷ : Semiring A
inst✝⁶ : Algebra R A
inst✝⁵ : StarRing A
inst✝⁴ : StarModule R A
inst✝³ : Semiring B
inst✝² : Algebra R B
inst✝¹ : StarRing B
inst✝ : StarModule R B
s : Set A
this : ∀ (t : Set A), Algebra.adjoin R (star t) ≤ star (Algebra.adjoin R t)
⊢ star (Algebra.adjoin R s) ≤ Algebra.adjoin R (star s)
state_after: no goals
Theorem: Multiset.Ico_eq_zero_iff
File: Mathlib/Order/Interval/Multiset.lean

tactic: rw [Ico, Finset.val_eq_zero, Finset.Ico_eq_empty_iff]
state_before: α : Type u_1
inst✝¹ : Preorder α
inst✝ : LocallyFiniteOrder α
a b c : α
⊢ Ico a b = 0 ↔ ¬a < b
state_after: no goals
Theorem: Complex.arg_eq_nhds_of_re_neg_of_im_pos
File: Mathlib/Analysis/SpecialFunctions/Complex/Arg.lean

tactic: suffices h_forall_nhds : ∀ᶠ y : ℂ in 𝓝 x, y.re < 0 ∧ 0 < y.im from
  h_forall_nhds.mono fun y hy => arg_of_re_neg_of_im_nonneg hy.1 hy.2.le
state_before: a x z : ℂ
hx_re : x.re < 0
hx_im : 0 < x.im
⊢ arg =ᶠ[𝓝 x] fun x => Real.arcsin ((-x).im / abs x) + π
state_after: a x z : ℂ
hx_re : x.re < 0
hx_im : 0 < x.im
⊢ ∀ᶠ (y : ℂ) in 𝓝 x, y.re < 0 ∧ 0 < y.im

tactic: refine IsOpen.eventually_mem ?_ (⟨hx_re, hx_im⟩ : x.re < 0 ∧ 0 < x.im)
state_before: a x z : ℂ
hx_re : x.re < 0
hx_im : 0 < x.im
⊢ ∀ᶠ (y : ℂ) in 𝓝 x, y.re < 0 ∧ 0 < y.im
state_after: a x z : ℂ
hx_re : x.re < 0
hx_im : 0 < x.im
⊢ IsOpen fun y => y.re < 0 ∧ 0 < y.im

tactic: exact
  IsOpen.and (isOpen_lt continuous_re continuous_zero) (isOpen_lt continuous_zero continuous_im)
state_before: a x z : ℂ
hx_re : x.re < 0
hx_im : 0 < x.im
⊢ IsOpen fun y => y.re < 0 ∧ 0 < y.im
state_after: no goals
Theorem: RCLike.norm_sq_re_conj_add
File: Mathlib/Analysis/RCLike/Basic.lean

tactic: rw [add_comm, norm_sq_re_add_conj]
state_before: K : Type u_1
E : Type u_2
inst✝ : RCLike K
z x : K
⊢ ‖(starRingEnd K) x + x‖ ^ 2 = re ((starRingEnd K) x + x) ^ 2
state_after: no goals
Theorem: sdiff_symmDiff_eq_sup
File: Mathlib/Order/SymmDiff.lean

tactic: rw [symmDiff_comm, symmDiff_sdiff_eq_sup, sup_comm]
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
π : ι → Type u_4
inst✝ : GeneralizedCoheytingAlgebra α
a b c d : α
⊢ (a \ b) ∆ b = a ⊔ b
state_after: no goals
Theorem: Nat.pow_sub_lt_descFactorial
File: Mathlib/Data/Nat/Factorial/Basic.lean

tactic: rintro ⟨⟩
state_before: n : ℕ
⊢ 2 ≤ 0 → 0 ≤ n → (n + 1 - 0) ^ 0 < n.descFactorial 0
state_after: no goals

tactic: intro
state_before: n : ℕ
⊢ 2 ≤ 1 → 1 ≤ n → (n + 1 - 1) ^ 1 < n.descFactorial 1
state_after: n : ℕ
a✝ : 2 ≤ 1
⊢ 1 ≤ n → (n + 1 - 1) ^ 1 < n.descFactorial 1

tactic: contradiction
state_before: n : ℕ
a✝ : 2 ≤ 1
⊢ 1 ≤ n → (n + 1 - 1) ^ 1 < n.descFactorial 1
state_after: no goals

tactic: rw [succ_sub_succ]
state_before: n k : ℕ
x✝ : 2 ≤ k + 2
h : k + 2 ≤ n
⊢ (n + 1 - (k + 2)) ^ (k + 2) < n.descFactorial (k + 2)
state_after: n k : ℕ
x✝ : 2 ≤ k + 2
h : k + 2 ≤ n
⊢ (n - (k + 1)) ^ (k + 2) < n.descFactorial (k + 2)

tactic: exact pow_sub_lt_descFactorial' h
state_before: n k : ℕ
x✝ : 2 ≤ k + 2
h : k + 2 ≤ n
⊢ (n - (k + 1)) ^ (k + 2) < n.descFactorial (k + 2)
state_after: no goals
Theorem: DirectSum.induction_on
File: Mathlib/Algebra/DirectSum/Basic.lean

tactic: apply DFinsupp.induction x H_zero
state_before: ι : Type v
dec_ι : DecidableEq ι
β : ι → Type w
inst✝ : (i : ι) → AddCommMonoid (β i)
C : (⨁ (i : ι), β i) → Prop
x : ⨁ (i : ι), β i
H_zero : C 0
H_basic : ∀ (i : ι) (x : β i), C ((of β i) x)
H_plus : ∀ (x y : ⨁ (i : ι), β i), C x → C y → C (x + y)
⊢ C x
state_after: ι : Type v
dec_ι : DecidableEq ι
β : ι → Type w
inst✝ : (i : ι) → AddCommMonoid (β i)
C : (⨁ (i : ι), β i) → Prop
x : ⨁ (i : ι), β i
H_zero : C 0
H_basic : ∀ (i : ι) (x : β i), C ((of β i) x)
H_plus : ∀ (x y : ⨁ (i : ι), β i), C x → C y → C (x + y)
⊢ ∀ (i : ι) (b : β i) (f : Π₀ (i : ι), β i), f i = 0 → b ≠ 0 → C f → C (DFinsupp.single i b + f)

tactic: intro i b f h1 h2 ih
state_before: ι : Type v
dec_ι : DecidableEq ι
β : ι → Type w
inst✝ : (i : ι) → AddCommMonoid (β i)
C : (⨁ (i : ι), β i) → Prop
x : ⨁ (i : ι), β i
H_zero : C 0
H_basic : ∀ (i : ι) (x : β i), C ((of β i) x)
H_plus : ∀ (x y : ⨁ (i : ι), β i), C x → C y → C (x + y)
⊢ ∀ (i : ι) (b : β i) (f : Π₀ (i : ι), β i), f i = 0 → b ≠ 0 → C f → C (DFinsupp.single i b + f)
state_after: ι : Type v
dec_ι : DecidableEq ι
β : ι → Type w
inst✝ : (i : ι) → AddCommMonoid (β i)
C : (⨁ (i : ι), β i) → Prop
x : ⨁ (i : ι), β i
H_zero : C 0
H_basic : ∀ (i : ι) (x : β i), C ((of β i) x)
H_plus : ∀ (x y : ⨁ (i : ι), β i), C x → C y → C (x + y)
i : ι
b : β i
f : Π₀ (i : ι), β i
h1 : f i = 0
h2 : b ≠ 0
ih : C f
⊢ C (DFinsupp.single i b + f)

tactic: solve_by_elim
state_before: ι : Type v
dec_ι : DecidableEq ι
β : ι → Type w
inst✝ : (i : ι) → AddCommMonoid (β i)
C : (⨁ (i : ι), β i) → Prop
x : ⨁ (i : ι), β i
H_zero : C 0
H_basic : ∀ (i : ι) (x : β i), C ((of β i) x)
H_plus : ∀ (x y : ⨁ (i : ι), β i), C x → C y → C (x + y)
i : ι
b : β i
f : Π₀ (i : ι), β i
h1 : f i = 0
h2 : b ≠ 0
ih : C f
⊢ C (DFinsupp.single i b + f)
state_after: no goals
Theorem: Basis.exists_opNNNorm_le
File: Mathlib/Analysis/NormedSpace/FiniteDimension.lean

tactic: cases nonempty_fintype ι
state_before: 𝕜 : Type u
inst✝¹¹ : NontriviallyNormedField 𝕜
E : Type v
inst✝¹⁰ : NormedAddCommGroup E
inst✝⁹ : NormedSpace 𝕜 E
F : Type w
inst✝⁸ : NormedAddCommGroup F
inst✝⁷ : NormedSpace 𝕜 F
F' : Type x
inst✝⁶ : AddCommGroup F'
inst✝⁵ : Module 𝕜 F'
inst✝⁴ : TopologicalSpace F'
inst✝³ : TopologicalAddGroup F'
inst✝² : ContinuousSMul 𝕜 F'
inst✝¹ : CompleteSpace 𝕜
ι : Type u_1
inst✝ : Finite ι
v : Basis ι 𝕜 E
⊢ ∃ C > 0, ∀ {u : E →L[𝕜] F} (M : ℝ≥0), (∀ (i : ι), ‖u (v i)‖₊ ≤ M) → ‖u‖₊ ≤ C * M
state_after: case intro
𝕜 : Type u
inst✝¹¹ : NontriviallyNormedField 𝕜
E : Type v
inst✝¹⁰ : NormedAddCommGroup E
inst✝⁹ : NormedSpace 𝕜 E
F : Type w
inst✝⁸ : NormedAddCommGroup F
inst✝⁷ : NormedSpace 𝕜 F
F' : Type x
inst✝⁶ : AddCommGroup F'
inst✝⁵ : Module 𝕜 F'
inst✝⁴ : TopologicalSpace F'
inst✝³ : TopologicalAddGroup F'
inst✝² : ContinuousSMul 𝕜 F'
inst✝¹ : CompleteSpace 𝕜
ι : Type u_1
inst✝ : Finite ι
v : Basis ι 𝕜 E
val✝ : Fintype ι
⊢ ∃ C > 0, ∀ {u : E →L[𝕜] F} (M : ℝ≥0), (∀ (i : ι), ‖u (v i)‖₊ ≤ M) → ‖u‖₊ ≤ C * M

tactic: exact
  ⟨max (Fintype.card ι • ‖v.equivFunL.toContinuousLinearMap‖₊) 1,
    zero_lt_one.trans_le (le_max_right _ _), fun {u} M hu =>
    (v.opNNNorm_le M hu).trans <| mul_le_mul_of_nonneg_right (le_max_left _ _) (zero_le M)⟩
state_before: case intro
𝕜 : Type u
inst✝¹¹ : NontriviallyNormedField 𝕜
E : Type v
inst✝¹⁰ : NormedAddCommGroup E
inst✝⁹ : NormedSpace 𝕜 E
F : Type w
inst✝⁸ : NormedAddCommGroup F
inst✝⁷ : NormedSpace 𝕜 F
F' : Type x
inst✝⁶ : AddCommGroup F'
inst✝⁵ : Module 𝕜 F'
inst✝⁴ : TopologicalSpace F'
inst✝³ : TopologicalAddGroup F'
inst✝² : ContinuousSMul 𝕜 F'
inst✝¹ : CompleteSpace 𝕜
ι : Type u_1
inst✝ : Finite ι
v : Basis ι 𝕜 E
val✝ : Fintype ι
⊢ ∃ C > 0, ∀ {u : E →L[𝕜] F} (M : ℝ≥0), (∀ (i : ι), ‖u (v i)‖₊ ≤ M) → ‖u‖₊ ≤ C * M
state_after: no goals
Theorem: CategoryTheory.ShortComplex.LeftHomologyMapData.homologyMap_eq
File: Mathlib/Algebra/Homology/ShortComplex/Homology.lean

tactic: dsimp [homologyMap, LeftHomologyData.homologyIso, leftHomologyIso,
  LeftHomologyData.leftHomologyIso, homologyMap']
state_before: C : Type u
inst✝³ : Category.{v, u} C
inst✝² : HasZeroMorphisms C
S S₁ S₂ S₃ S₄ : ShortComplex C
φ : S₁ ⟶ S₂
h₁✝ : S₁.HomologyData
h₂✝ : S₂.HomologyData
h₁ : S₁.LeftHomologyData
h₂ : S₂.LeftHomologyData
γ : LeftHomologyMapData φ h₁ h₂
inst✝¹ : S₁.HasHomology
inst✝ : S₂.HasHomology
⊢ homologyMap φ = h₁.homologyIso.hom ≫ γ.φH ≫ h₂.homologyIso.inv
state_after: C : Type u
inst✝³ : Category.{v, u} C
inst✝² : HasZeroMorphisms C
S S₁ S₂ S₃ S₄ : ShortComplex C
φ : S₁ ⟶ S₂
h₁✝ : S₁.HomologyData
h₂✝ : S₂.HomologyData
h₁ : S₁.LeftHomologyData
h₂ : S₂.LeftHomologyData
γ : LeftHomologyMapData φ h₁ h₂
inst✝¹ : S₁.HasHomology
inst✝ : S₂.HasHomology
⊢ leftHomologyMap' φ S₁.homologyData.left S₂.homologyData.left =
    (leftHomologyMap' (𝟙 S₁) S₁.homologyData.left S₁.leftHomologyData ≫
        leftHomologyMap' (𝟙 S₁) S₁.leftHomologyData h₁) ≫
      γ.φH ≫
        leftHomologyMap' (𝟙 S₂) h₂ S₂.leftHomologyData ≫
          leftHomologyMap' (𝟙 S₂) S₂.leftHomologyData S₂.homologyData.left

tactic: simp only [← γ.leftHomologyMap'_eq, ← leftHomologyMap'_comp, id_comp, comp_id]
state_before: C : Type u
inst✝³ : Category.{v, u} C
inst✝² : HasZeroMorphisms C
S S₁ S₂ S₃ S₄ : ShortComplex C
φ : S₁ ⟶ S₂
h₁✝ : S₁.HomologyData
h₂✝ : S₂.HomologyData
h₁ : S₁.LeftHomologyData
h₂ : S₂.LeftHomologyData
γ : LeftHomologyMapData φ h₁ h₂
inst✝¹ : S₁.HasHomology
inst✝ : S₂.HasHomology
⊢ leftHomologyMap' φ S₁.homologyData.left S₂.homologyData.left =
    (leftHomologyMap' (𝟙 S₁) S₁.homologyData.left S₁.leftHomologyData ≫
        leftHomologyMap' (𝟙 S₁) S₁.leftHomologyData h₁) ≫
      γ.φH ≫
        leftHomologyMap' (𝟙 S₂) h₂ S₂.leftHomologyData ≫
          leftHomologyMap' (𝟙 S₂) S₂.leftHomologyData S₂.homologyData.left
state_after: no goals
Theorem: Polynomial.not_dvd_of_natDegree_lt
File: Mathlib/Algebra/Polynomial/RingDivision.lean

tactic: by_contra hcontra
state_before: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : Semiring R
inst✝ : NoZeroDivisors R
p✝ q✝ p q : R[X]
h0 : q ≠ 0
hl : q.natDegree < p.natDegree
⊢ ¬p ∣ q
state_after: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : Semiring R
inst✝ : NoZeroDivisors R
p✝ q✝ p q : R[X]
h0 : q ≠ 0
hl : q.natDegree < p.natDegree
hcontra : p ∣ q
⊢ False

tactic: exact h0 (eq_zero_of_dvd_of_natDegree_lt hcontra hl)
state_before: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : Semiring R
inst✝ : NoZeroDivisors R
p✝ q✝ p q : R[X]
h0 : q ≠ 0
hl : q.natDegree < p.natDegree
hcontra : p ∣ q
⊢ False
state_after: no goals
Theorem: Rel.card_interedges_finpartition
File: Mathlib/Combinatorics/SimpleGraph/Density.lean

tactic: rw [card_interedges_finpartition_left _ P, sum_product]
state_before: 𝕜 : Type u_1
ι : Type u_2
κ : Type u_3
α : Type u_4
β : Type u_5
inst✝³ : LinearOrderedField 𝕜
r : α → β → Prop
inst✝² : (a : α) → DecidablePred (r a)
s s₁ s₂ : Finset α
t t₁ t₂ : Finset β
a : α
b : β
δ : 𝕜
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
P : Finpartition s
Q : Finpartition t
⊢ (interedges r s t).card = ∑ ab ∈ P.parts ×ˢ Q.parts, (interedges r ab.1 ab.2).card
state_after: 𝕜 : Type u_1
ι : Type u_2
κ : Type u_3
α : Type u_4
β : Type u_5
inst✝³ : LinearOrderedField 𝕜
r : α → β → Prop
inst✝² : (a : α) → DecidablePred (r a)
s s₁ s₂ : Finset α
t t₁ t₂ : Finset β
a : α
b : β
δ : 𝕜
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
P : Finpartition s
Q : Finpartition t
⊢ ∑ a ∈ P.parts, (interedges r a t).card = ∑ x ∈ P.parts, ∑ y ∈ Q.parts, (interedges r (x, y).1 (x, y).2).card

tactic: congr
state_before: 𝕜 : Type u_1
ι : Type u_2
κ : Type u_3
α : Type u_4
β : Type u_5
inst✝³ : LinearOrderedField 𝕜
r : α → β → Prop
inst✝² : (a : α) → DecidablePred (r a)
s s₁ s₂ : Finset α
t t₁ t₂ : Finset β
a : α
b : β
δ : 𝕜
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
P : Finpartition s
Q : Finpartition t
⊢ ∑ a ∈ P.parts, (interedges r a t).card = ∑ x ∈ P.parts, ∑ y ∈ Q.parts, (interedges r (x, y).1 (x, y).2).card
state_after: case e_f
𝕜 : Type u_1
ι : Type u_2
κ : Type u_3
α : Type u_4
β : Type u_5
inst✝³ : LinearOrderedField 𝕜
r : α → β → Prop
inst✝² : (a : α) → DecidablePred (r a)
s s₁ s₂ : Finset α
t t₁ t₂ : Finset β
a : α
b : β
δ : 𝕜
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
P : Finpartition s
Q : Finpartition t
⊢ (fun a => (interedges r a t).card) = fun x => ∑ y ∈ Q.parts, (interedges r (x, y).1 (x, y).2).card

tactic: ext
state_before: case e_f
𝕜 : Type u_1
ι : Type u_2
κ : Type u_3
α : Type u_4
β : Type u_5
inst✝³ : LinearOrderedField 𝕜
r : α → β → Prop
inst✝² : (a : α) → DecidablePred (r a)
s s₁ s₂ : Finset α
t t₁ t₂ : Finset β
a : α
b : β
δ : 𝕜
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
P : Finpartition s
Q : Finpartition t
⊢ (fun a => (interedges r a t).card) = fun x => ∑ y ∈ Q.parts, (interedges r (x, y).1 (x, y).2).card
state_after: case e_f.h
𝕜 : Type u_1
ι : Type u_2
κ : Type u_3
α : Type u_4
β : Type u_5
inst✝³ : LinearOrderedField 𝕜
r : α → β → Prop
inst✝² : (a : α) → DecidablePred (r a)
s s₁ s₂ : Finset α
t t₁ t₂ : Finset β
a : α
b : β
δ : 𝕜
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
P : Finpartition s
Q : Finpartition t
x✝ : Finset α
⊢ (interedges r x✝ t).card = ∑ y ∈ Q.parts, (interedges r (x✝, y).1 (x✝, y).2).card

tactic: rw [card_interedges_finpartition_right]
state_before: case e_f.h
𝕜 : Type u_1
ι : Type u_2
κ : Type u_3
α : Type u_4
β : Type u_5
inst✝³ : LinearOrderedField 𝕜
r : α → β → Prop
inst✝² : (a : α) → DecidablePred (r a)
s s₁ s₂ : Finset α
t t₁ t₂ : Finset β
a : α
b : β
δ : 𝕜
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
P : Finpartition s
Q : Finpartition t
x✝ : Finset α
⊢ (interedges r x✝ t).card = ∑ y ∈ Q.parts, (interedges r (x✝, y).1 (x✝, y).2).card
state_after: no goals
Theorem: AlgebraicGeometry.ProjectiveSpectrum.Proj.toSpec_base_apply_eq
File: Mathlib/AlgebraicGeometry/ProjectiveSpectrum/Scheme.lean

tactic: obtain ⟨z, rfl⟩ := z.mk_surjective
state_before: R : Type u_1
A : Type u_2
inst✝³ : CommRing R
inst✝² : CommRing A
inst✝¹ : Algebra R A
𝒜 : ℕ → Submodule R A
inst✝ : GradedAlgebra 𝒜
f : A
x : ↑(Proj.restrict ⋯).toTopCat
z : HomogeneousLocalization 𝒜 (Submonoid.powers f)
⊢ ¬IsUnit ((mapId 𝒜 ⋯) z) ↔ z ∈ ProjIsoSpecTopComponent.ToSpec.carrier x
state_after: case intro
R : Type u_1
A : Type u_2
inst✝³ : CommRing R
inst✝² : CommRing A
inst✝¹ : Algebra R A
𝒜 : ℕ → Submodule R A
inst✝ : GradedAlgebra 𝒜
f : A
x : ↑(Proj.restrict ⋯).toTopCat
z : NumDenSameDeg 𝒜 (Submonoid.powers f)
⊢ ¬IsUnit ((mapId 𝒜 ⋯) (HomogeneousLocalization.mk z)) ↔
    HomogeneousLocalization.mk z ∈ ProjIsoSpecTopComponent.ToSpec.carrier x

tactic: rw [← HomogeneousLocalization.isUnit_iff_isUnit_val,
  ProjIsoSpecTopComponent.ToSpec.mk_mem_carrier, HomogeneousLocalization.map_mk,
  HomogeneousLocalization.val_mk, Localization.mk_eq_mk',
  IsLocalization.AtPrime.isUnit_mk'_iff]
state_before: case intro
R : Type u_1
A : Type u_2
inst✝³ : CommRing R
inst✝² : CommRing A
inst✝¹ : Algebra R A
𝒜 : ℕ → Submodule R A
inst✝ : GradedAlgebra 𝒜
f : A
x : ↑(Proj.restrict ⋯).toTopCat
z : NumDenSameDeg 𝒜 (Submonoid.powers f)
⊢ ¬IsUnit ((mapId 𝒜 ⋯) (HomogeneousLocalization.mk z)) ↔
    HomogeneousLocalization.mk z ∈ ProjIsoSpecTopComponent.ToSpec.carrier x
state_after: case intro
R : Type u_1
A : Type u_2
inst✝³ : CommRing R
inst✝² : CommRing A
inst✝¹ : Algebra R A
𝒜 : ℕ → Submodule R A
inst✝ : GradedAlgebra 𝒜
f : A
x : ↑(Proj.restrict ⋯).toTopCat
z : NumDenSameDeg 𝒜 (Submonoid.powers f)
⊢ ↑{ deg := z.deg, num := ⟨(RingHom.id A) ↑z.num, ⋯⟩, den := ⟨(RingHom.id A) ↑z.den, ⋯⟩, den_mem := ⋯ }.num ∉
      (↑x).asHomogeneousIdeal.toIdeal.primeCompl ↔
    ↑z.num ∈ (↑x).asHomogeneousIdeal

tactic: exact not_not
state_before: case intro
R : Type u_1
A : Type u_2
inst✝³ : CommRing R
inst✝² : CommRing A
inst✝¹ : Algebra R A
𝒜 : ℕ → Submodule R A
inst✝ : GradedAlgebra 𝒜
f : A
x : ↑(Proj.restrict ⋯).toTopCat
z : NumDenSameDeg 𝒜 (Submonoid.powers f)
⊢ ↑{ deg := z.deg, num := ⟨(RingHom.id A) ↑z.num, ⋯⟩, den := ⟨(RingHom.id A) ↑z.den, ⋯⟩, den_mem := ⋯ }.num ∉
      (↑x).asHomogeneousIdeal.toIdeal.primeCompl ↔
    ↑z.num ∈ (↑x).asHomogeneousIdeal
state_after: no goals
Theorem: Nat.multinomial_univ_two
File: Mathlib/Data/Nat/Choose/Multinomial.lean

tactic: rw [multinomial, Fin.sum_univ_two, Fin.prod_univ_two, Matrix.cons_val_zero, Matrix.cons_val_one,
  Matrix.head_cons]
state_before: α : Type u_1
s : Finset α
f : α → ℕ
a✝ b✝ : α
n a b : ℕ
⊢ multinomial univ ![a, b] = (a + b)! / (a ! * b !)
state_after: no goals