1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: ProbabilityTheory.IdentDistrib.comp_of_aemeasurable
File: Mathlib/Probability/IdentDistrib.lean

tactic: rw [h.map_eq] at hu
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝³ : MeasurableSpace α
inst✝² : MeasurableSpace β
inst✝¹ : MeasurableSpace γ
inst✝ : MeasurableSpace δ
μ : Measure α
ν : Measure β
f : α → γ
g : β → γ
u : γ → δ
h : IdentDistrib f g μ ν
hu : AEMeasurable u (Measure.map f μ)
⊢ AEMeasurable (u ∘ g) ν
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝³ : MeasurableSpace α
inst✝² : MeasurableSpace β
inst✝¹ : MeasurableSpace γ
inst✝ : MeasurableSpace δ
μ : Measure α
ν : Measure β
f : α → γ
g : β → γ
u : γ → δ
h : IdentDistrib f g μ ν
hu : AEMeasurable u (Measure.map g ν)
⊢ AEMeasurable (u ∘ g) ν

tactic: exact hu.comp_aemeasurable h.aemeasurable_snd
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝³ : MeasurableSpace α
inst✝² : MeasurableSpace β
inst✝¹ : MeasurableSpace γ
inst✝ : MeasurableSpace δ
μ : Measure α
ν : Measure β
f : α → γ
g : β → γ
u : γ → δ
h : IdentDistrib f g μ ν
hu : AEMeasurable u (Measure.map g ν)
⊢ AEMeasurable (u ∘ g) ν
state_after: no goals

tactic: rw [← AEMeasurable.map_map_of_aemeasurable hu h.aemeasurable_fst, ←
  AEMeasurable.map_map_of_aemeasurable _ h.aemeasurable_snd, h.map_eq]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝³ : MeasurableSpace α
inst✝² : MeasurableSpace β
inst✝¹ : MeasurableSpace γ
inst✝ : MeasurableSpace δ
μ : Measure α
ν : Measure β
f : α → γ
g : β → γ
u : γ → δ
h : IdentDistrib f g μ ν
hu : AEMeasurable u (Measure.map f μ)
⊢ Measure.map (u ∘ f) μ = Measure.map (u ∘ g) ν
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝³ : MeasurableSpace α
inst✝² : MeasurableSpace β
inst✝¹ : MeasurableSpace γ
inst✝ : MeasurableSpace δ
μ : Measure α
ν : Measure β
f : α → γ
g : β → γ
u : γ → δ
h : IdentDistrib f g μ ν
hu : AEMeasurable u (Measure.map f μ)
⊢ AEMeasurable u (Measure.map g ν)

tactic: rwa [← h.map_eq]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝³ : MeasurableSpace α
inst✝² : MeasurableSpace β
inst✝¹ : MeasurableSpace γ
inst✝ : MeasurableSpace δ
μ : Measure α
ν : Measure β
f : α → γ
g : β → γ
u : γ → δ
h : IdentDistrib f g μ ν
hu : AEMeasurable u (Measure.map f μ)
⊢ AEMeasurable u (Measure.map g ν)
state_after: no goals
Theorem: Mathlib.Meta.Positivity.log_pos_of_isRat_neg
File: Mathlib/Analysis/SpecialFunctions/Log/Basic.lean

tactic: rw [eq, invOf_eq_inv, ← div_eq_mul_inv]
state_before: e : ℝ
d : ℕ
n : ℤ
inv : Invertible ↑d
eq : e = ↑n * ⅟↑d
h : decide (↑n / ↑d < -1) = true
⊢ 0 < Real.log e
state_after: e : ℝ
d : ℕ
n : ℤ
inv : Invertible ↑d
eq : e = ↑n * ⅟↑d
h : decide (↑n / ↑d < -1) = true
⊢ 0 < Real.log (↑n / ↑d)

tactic: have : (n : ℝ) / d < -1 := by exact_mod_cast of_decide_eq_true h
state_before: e : ℝ
d : ℕ
n : ℤ
inv : Invertible ↑d
eq : e = ↑n * ⅟↑d
h : decide (↑n / ↑d < -1) = true
⊢ 0 < Real.log (↑n / ↑d)
state_after: e : ℝ
d : ℕ
n : ℤ
inv : Invertible ↑d
eq : e = ↑n * ⅟↑d
h : decide (↑n / ↑d < -1) = true
this : ↑n / ↑d < -1
⊢ 0 < Real.log (↑n / ↑d)

tactic: exact Real.log_pos_of_lt_neg_one this
state_before: e : ℝ
d : ℕ
n : ℤ
inv : Invertible ↑d
eq : e = ↑n * ⅟↑d
h : decide (↑n / ↑d < -1) = true
this : ↑n / ↑d < -1
⊢ 0 < Real.log (↑n / ↑d)
state_after: no goals

tactic: exact_mod_cast of_decide_eq_true h
state_before: e : ℝ
d : ℕ
n : ℤ
inv : Invertible ↑d
eq : e = ↑n * ⅟↑d
h : decide (↑n / ↑d < -1) = true
⊢ ↑n / ↑d < -1
state_after: no goals
Theorem: iSup₂_comm
File: Mathlib/Order/CompleteLattice.lean

tactic: simp only [@iSup_comm _ (κ₁ _), @iSup_comm _ ι₁]
state_before: α : Type u_1
β : Type u_2
β₂ : Type u_3
γ : Type u_4
ι : Sort u_5
ι' : Sort u_6
κ : ι → Sort u_7
κ' : ι' → Sort u_8
inst✝ : CompleteLattice α
f✝ g s t : ι → α
a b : α
ι₁ : Sort u_9
ι₂ : Sort u_10
κ₁ : ι₁ → Sort u_11
κ₂ : ι₂ → Sort u_12
f : (i₁ : ι₁) → κ₁ i₁ → (i₂ : ι₂) → κ₂ i₂ → α
⊢ ⨆ i₁, ⨆ j₁, ⨆ i₂, ⨆ j₂, f i₁ j₁ i₂ j₂ = ⨆ i₂, ⨆ j₂, ⨆ i₁, ⨆ j₁, f i₁ j₁ i₂ j₂
state_after: no goals
Theorem: Nat.periodic_mod
File: Mathlib/Data/Nat/Periodic.lean

tactic: simp only [forall_const, eq_self_iff_true, add_mod_right, Periodic]
state_before: a : ℕ
⊢ Periodic (fun n => n % a) a
state_after: no goals
Theorem: padicValNat_mul_pow_left
File: Mathlib/NumberTheory/Padics/PadicVal.lean

tactic: rw [padicValNat.mul (NeZero.ne' (p^n)).symm (NeZero.ne' (q^m)).symm,
  padicValNat.prime_pow, padicValNat_prime_prime_pow m neq, add_zero]
state_before: p q : ℕ
hp : Fact (Nat.Prime p)
hq : Fact (Nat.Prime q)
n m : ℕ
neq : p ≠ q
⊢ padicValNat p (p ^ n * q ^ m) = n
state_after: no goals
Theorem: inv_lt_one
File: Mathlib/Algebra/Order/Field/Basic.lean

tactic: rwa [inv_lt (zero_lt_one.trans ha) zero_lt_one, inv_one]
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : LinearOrderedSemifield α
a b c d e : α
m n : ℤ
ha : 1 < a
⊢ a⁻¹ < 1
state_after: no goals
Theorem: MeasureTheory.FiniteMeasure.prod_apply_symm
File: Mathlib/MeasureTheory/Measure/FiniteMeasureProd.lean

tactic: simp [coeFn_def, Measure.prod_apply_symm s_mble]
state_before: α : Type u_1
inst✝¹ : MeasurableSpace α
β : Type u_2
inst✝ : MeasurableSpace β
μ : FiniteMeasure α
ν : FiniteMeasure β
s : Set (α × β)
s_mble : MeasurableSet s
⊢ (μ.prod ν) s = (∫⁻ (y : β), ↑μ ((fun x => (x, y)) ⁻¹' s) ∂↑ν).toNNReal
state_after: no goals
Theorem: Associates.mk_dvdNotUnit_mk_iff
File: Mathlib/Algebra/Associated.lean

tactic: simp only [DvdNotUnit, mk_ne_zero, mk_surjective.exists, isUnit_mk, mk_mul_mk,
  mk_eq_mk_iff_associated, Associated.comm (x := b)]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : CommMonoidWithZero α
a b : α
⊢ DvdNotUnit (Associates.mk a) (Associates.mk b) ↔ DvdNotUnit a b
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : CommMonoidWithZero α
a b : α
⊢ (a ≠ 0 ∧ ∃ x, ¬IsUnit x ∧ a * x ~ᵤ b) ↔ a ≠ 0 ∧ ∃ x, ¬IsUnit x ∧ b = a * x

tactic: refine Iff.rfl.and ?_
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : CommMonoidWithZero α
a b : α
⊢ (a ≠ 0 ∧ ∃ x, ¬IsUnit x ∧ a * x ~ᵤ b) ↔ a ≠ 0 ∧ ∃ x, ¬IsUnit x ∧ b = a * x
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : CommMonoidWithZero α
a b : α
⊢ (∃ x, ¬IsUnit x ∧ a * x ~ᵤ b) ↔ ∃ x, ¬IsUnit x ∧ b = a * x

tactic: constructor
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : CommMonoidWithZero α
a b : α
⊢ (∃ x, ¬IsUnit x ∧ a * x ~ᵤ b) ↔ ∃ x, ¬IsUnit x ∧ b = a * x
state_after: case mp
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : CommMonoidWithZero α
a b : α
⊢ (∃ x, ¬IsUnit x ∧ a * x ~ᵤ b) → ∃ x, ¬IsUnit x ∧ b = a * x

case mpr
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : CommMonoidWithZero α
a b : α
⊢ (∃ x, ¬IsUnit x ∧ b = a * x) → ∃ x, ¬IsUnit x ∧ a * x ~ᵤ b

tactic: rintro ⟨x, hx, u, rfl⟩
state_before: case mp
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : CommMonoidWithZero α
a b : α
⊢ (∃ x, ¬IsUnit x ∧ a * x ~ᵤ b) → ∃ x, ¬IsUnit x ∧ b = a * x
state_after: case mp.intro.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : CommMonoidWithZero α
a x : α
hx : ¬IsUnit x
u : αˣ
⊢ ∃ x_1, ¬IsUnit x_1 ∧ a * x * ↑u = a * x_1

tactic: refine ⟨x * u, ?_, mul_assoc ..⟩
state_before: case mp.intro.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : CommMonoidWithZero α
a x : α
hx : ¬IsUnit x
u : αˣ
⊢ ∃ x_1, ¬IsUnit x_1 ∧ a * x * ↑u = a * x_1
state_after: case mp.intro.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : CommMonoidWithZero α
a x : α
hx : ¬IsUnit x
u : αˣ
⊢ ¬IsUnit (x * ↑u)

tactic: simpa
state_before: case mp.intro.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : CommMonoidWithZero α
a x : α
hx : ¬IsUnit x
u : αˣ
⊢ ¬IsUnit (x * ↑u)
state_after: no goals

tactic: rintro ⟨x, ⟨hx, rfl⟩⟩
state_before: case mpr
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : CommMonoidWithZero α
a b : α
⊢ (∃ x, ¬IsUnit x ∧ b = a * x) → ∃ x, ¬IsUnit x ∧ a * x ~ᵤ b
state_after: case mpr.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : CommMonoidWithZero α
a x : α
hx : ¬IsUnit x
⊢ ∃ x_1, ¬IsUnit x_1 ∧ a * x_1 ~ᵤ a * x

tactic: use x
state_before: case mpr.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : CommMonoidWithZero α
a x : α
hx : ¬IsUnit x
⊢ ∃ x_1, ¬IsUnit x_1 ∧ a * x_1 ~ᵤ a * x
state_after: no goals
Theorem: Polynomial.eq_one_of_monic_natDegree_zero
File: Mathlib/Algebra/Polynomial/Degree/Definitions.lean

tactic: rw [Monic.def, leadingCoeff, hfd] at hf
state_before: R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Semiring R
p✝ p q : R[X]
ι : Type u_1
hf : p.Monic
hfd : p.natDegree = 0
⊢ p = 1
state_after: R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Semiring R
p✝ p q : R[X]
ι : Type u_1
hf : p.coeff 0 = 1
hfd : p.natDegree = 0
⊢ p = 1

tactic: rw [eq_C_of_natDegree_eq_zero hfd, hf, map_one]
state_before: R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Semiring R
p✝ p q : R[X]
ι : Type u_1
hf : p.coeff 0 = 1
hfd : p.natDegree = 0
⊢ p = 1
state_after: no goals
Theorem: DFinsupp.coe_tsub
File: Mathlib/Data/DFinsupp/Order.lean

tactic: ext i
state_before: ι : Type u_1
α : ι → Type u_2
inst✝² : (i : ι) → CanonicallyOrderedAddCommMonoid (α i)
inst✝¹ : (i : ι) → Sub (α i)
inst✝ : ∀ (i : ι), OrderedSub (α i)
f✝ g✝ : Π₀ (i : ι), α i
i : ι
a b : α i
f g : Π₀ (i : ι), α i
⊢ ⇑(f - g) = ⇑f - ⇑g
state_after: case h
ι : Type u_1
α : ι → Type u_2
inst✝² : (i : ι) → CanonicallyOrderedAddCommMonoid (α i)
inst✝¹ : (i : ι) → Sub (α i)
inst✝ : ∀ (i : ι), OrderedSub (α i)
f✝ g✝ : Π₀ (i : ι), α i
i✝ : ι
a b : α i✝
f g : Π₀ (i : ι), α i
i : ι
⊢ (f - g) i = (⇑f - ⇑g) i

tactic: exact tsub_apply f g i
state_before: case h
ι : Type u_1
α : ι → Type u_2
inst✝² : (i : ι) → CanonicallyOrderedAddCommMonoid (α i)
inst✝¹ : (i : ι) → Sub (α i)
inst✝ : ∀ (i : ι), OrderedSub (α i)
f✝ g✝ : Π₀ (i : ι), α i
i✝ : ι
a b : α i✝
f g : Π₀ (i : ι), α i
i : ι
⊢ (f - g) i = (⇑f - ⇑g) i
state_after: no goals
Theorem: MeasureTheory.Measure.mconv_zero
File: Mathlib/MeasureTheory/Group/Convolution.lean

tactic: unfold mconv
state_before: M : Type u_1
inst✝¹ : Monoid M
inst✝ : MeasurableSpace M
μ : Measure M
⊢ 0 ∗ μ = 0
state_after: M : Type u_1
inst✝¹ : Monoid M
inst✝ : MeasurableSpace M
μ : Measure M
⊢ map (fun x => x.1 * x.2) (Measure.prod 0 μ) = 0

tactic: simp
state_before: M : Type u_1
inst✝¹ : Monoid M
inst✝ : MeasurableSpace M
μ : Measure M
⊢ map (fun x => x.1 * x.2) (Measure.prod 0 μ) = 0
state_after: no goals
Theorem: LieAlgebra.zeroRootSubalgebra_eq_iff_is_cartan
File: Mathlib/Algebra/Lie/Weights/Cartan.lean

tactic: intros
state_before: R : Type u_1
L : Type u_2
inst✝⁸ : CommRing R
inst✝⁷ : LieRing L
inst✝⁶ : LieAlgebra R L
H : LieSubalgebra R L
inst✝⁵ : IsNilpotent R ↥H
M : Type u_3
inst✝⁴ : AddCommGroup M
inst✝³ : Module R M
inst✝² : LieRingModule L M
inst✝¹ : LieModule R L M
inst✝ : IsNoetherian R L
⊢ H.IsCartanSubalgebra → zeroRootSubalgebra R L H = H
state_after: R : Type u_1
L : Type u_2
inst✝⁸ : CommRing R
inst✝⁷ : LieRing L
inst✝⁶ : LieAlgebra R L
H : LieSubalgebra R L
inst✝⁵ : IsNilpotent R ↥H
M : Type u_3
inst✝⁴ : AddCommGroup M
inst✝³ : Module R M
inst✝² : LieRingModule L M
inst✝¹ : LieModule R L M
inst✝ : IsNoetherian R L
a✝ : H.IsCartanSubalgebra
⊢ zeroRootSubalgebra R L H = H

tactic: simp
state_before: R : Type u_1
L : Type u_2
inst✝⁸ : CommRing R
inst✝⁷ : LieRing L
inst✝⁶ : LieAlgebra R L
H : LieSubalgebra R L
inst✝⁵ : IsNilpotent R ↥H
M : Type u_3
inst✝⁴ : AddCommGroup M
inst✝³ : Module R M
inst✝² : LieRingModule L M
inst✝¹ : LieModule R L M
inst✝ : IsNoetherian R L
a✝ : H.IsCartanSubalgebra
⊢ zeroRootSubalgebra R L H = H
state_after: no goals
Theorem: Finset.univ_map_embedding
File: Mathlib/Data/Fintype/Card.lean

tactic: rw [← e.equiv_of_fintype_self_embedding_to_embedding, univ_map_equiv_to_embedding]
state_before: α✝ : Type u_1
β : Type u_2
γ : Type u_3
α : Type u_4
inst✝ : Fintype α
e : α ↪ α
⊢ map e univ = univ
state_after: no goals
Theorem: AddLECancellable.tsub_tsub_tsub_cancel_left
File: Mathlib/Algebra/Order/Sub/Canonical.lean

tactic: rw [tsub_right_comm, hab.tsub_tsub_cancel_of_le h]
state_before: α : Type u_1
inst✝⁵ : AddCommSemigroup α
inst✝⁴ : PartialOrder α
inst✝³ : ExistsAddOfLE α
inst✝² : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
inst✝¹ : Sub α
inst✝ : OrderedSub α
a b c d : α
hab : AddLECancellable (a - b)
h : b ≤ a
⊢ a - c - (a - b) = b - c
state_after: no goals
Theorem: orthogonalProjectionFn_norm_sq
File: Mathlib/Analysis/InnerProductSpace/Projection.lean

tactic: set p := orthogonalProjectionFn K v
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁵ : _root_.RCLike 𝕜
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedAddCommGroup F
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : InnerProductSpace ℝ F
K : Submodule 𝕜 E
inst✝ : HasOrthogonalProjection K
v : E
⊢ ‖v‖ * ‖v‖ =
    ‖v - orthogonalProjectionFn K v‖ * ‖v - orthogonalProjectionFn K v‖ +
      ‖orthogonalProjectionFn K v‖ * ‖orthogonalProjectionFn K v‖
state_after: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁵ : _root_.RCLike 𝕜
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedAddCommGroup F
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : InnerProductSpace ℝ F
K : Submodule 𝕜 E
inst✝ : HasOrthogonalProjection K
v : E
p : E := orthogonalProjectionFn K v
⊢ ‖v‖ * ‖v‖ = ‖v - p‖ * ‖v - p‖ + ‖p‖ * ‖p‖

tactic: have h' : ⟪v - p, p⟫ = 0 :=
  orthogonalProjectionFn_inner_eq_zero _ _ (orthogonalProjectionFn_mem v)
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁵ : _root_.RCLike 𝕜
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedAddCommGroup F
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : InnerProductSpace ℝ F
K : Submodule 𝕜 E
inst✝ : HasOrthogonalProjection K
v : E
p : E := orthogonalProjectionFn K v
⊢ ‖v‖ * ‖v‖ = ‖v - p‖ * ‖v - p‖ + ‖p‖ * ‖p‖
state_after: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁵ : _root_.RCLike 𝕜
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedAddCommGroup F
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : InnerProductSpace ℝ F
K : Submodule 𝕜 E
inst✝ : HasOrthogonalProjection K
v : E
p : E := orthogonalProjectionFn K v
h' : ⟪v - p, p⟫_𝕜 = 0
⊢ ‖v‖ * ‖v‖ = ‖v - p‖ * ‖v - p‖ + ‖p‖ * ‖p‖

tactic: convert norm_add_sq_eq_norm_sq_add_norm_sq_of_inner_eq_zero (v - p) p h' using 2 <;> simp
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁵ : _root_.RCLike 𝕜
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedAddCommGroup F
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : InnerProductSpace ℝ F
K : Submodule 𝕜 E
inst✝ : HasOrthogonalProjection K
v : E
p : E := orthogonalProjectionFn K v
h' : ⟪v - p, p⟫_𝕜 = 0
⊢ ‖v‖ * ‖v‖ = ‖v - p‖ * ‖v - p‖ + ‖p‖ * ‖p‖
state_after: no goals
Theorem: HomologicalComplex.mono_of_mono_f
File: Mathlib/Algebra/Homology/HomologicalComplex.lean

tactic: ext i
state_before: ι : Type u_1
V : Type u
inst✝¹ : Category.{v, u} V
inst✝ : HasZeroMorphisms V
c : ComplexShape ι
C K L : HomologicalComplex V c
φ : K ⟶ L
hφ : ∀ (i : ι), Mono (φ.f i)
Z✝ : HomologicalComplex V c
g h : Z✝ ⟶ K
eq : g ≫ φ = h ≫ φ
⊢ g = h
state_after: case h
ι : Type u_1
V : Type u
inst✝¹ : Category.{v, u} V
inst✝ : HasZeroMorphisms V
c : ComplexShape ι
C K L : HomologicalComplex V c
φ : K ⟶ L
hφ : ∀ (i : ι), Mono (φ.f i)
Z✝ : HomologicalComplex V c
g h : Z✝ ⟶ K
eq : g ≫ φ = h ≫ φ
i : ι
⊢ g.f i = h.f i

tactic: rw [← cancel_mono (φ.f i)]
state_before: case h
ι : Type u_1
V : Type u
inst✝¹ : Category.{v, u} V
inst✝ : HasZeroMorphisms V
c : ComplexShape ι
C K L : HomologicalComplex V c
φ : K ⟶ L
hφ : ∀ (i : ι), Mono (φ.f i)
Z✝ : HomologicalComplex V c
g h : Z✝ ⟶ K
eq : g ≫ φ = h ≫ φ
i : ι
⊢ g.f i = h.f i
state_after: case h
ι : Type u_1
V : Type u
inst✝¹ : Category.{v, u} V
inst✝ : HasZeroMorphisms V
c : ComplexShape ι
C K L : HomologicalComplex V c
φ : K ⟶ L
hφ : ∀ (i : ι), Mono (φ.f i)
Z✝ : HomologicalComplex V c
g h : Z✝ ⟶ K
eq : g ≫ φ = h ≫ φ
i : ι
⊢ g.f i ≫ φ.f i = h.f i ≫ φ.f i

tactic: exact congr_hom eq i
state_before: case h
ι : Type u_1
V : Type u
inst✝¹ : Category.{v, u} V
inst✝ : HasZeroMorphisms V
c : ComplexShape ι
C K L : HomologicalComplex V c
φ : K ⟶ L
hφ : ∀ (i : ι), Mono (φ.f i)
Z✝ : HomologicalComplex V c
g h : Z✝ ⟶ K
eq : g ≫ φ = h ≫ φ
i : ι
⊢ g.f i ≫ φ.f i = h.f i ≫ φ.f i
state_after: no goals
Theorem: Num.ofNat'_eq
File: Mathlib/Data/Num/Lemmas.lean

tactic: simp
state_before: α : Type u_1
⊢ ofNat' 0 = ↑0
state_after: no goals

tactic: rw [ofNat'] at IH ⊢
state_before: α : Type u_1
b : Bool
n : ℕ
IH : ofNat' n = ↑n
⊢ ofNat' (Nat.bit b n) = ↑(Nat.bit b n)
state_after: α : Type u_1
b : Bool
n : ℕ
IH : Nat.binaryRec 0 (fun b x => bif b then Num.bit1 else Num.bit0) n = ↑n
⊢ Nat.binaryRec 0 (fun b x => bif b then Num.bit1 else Num.bit0) (Nat.bit b n) = ↑(Nat.bit b n)

tactic: rw [Nat.binaryRec_eq, IH]
state_before: α : Type u_1
b : Bool
n : ℕ
IH : Nat.binaryRec 0 (fun b x => bif b then Num.bit1 else Num.bit0) n = ↑n
⊢ Nat.binaryRec 0 (fun b x => bif b then Num.bit1 else Num.bit0) (Nat.bit b n) = ↑(Nat.bit b n)
state_after: α : Type u_1
b : Bool
n : ℕ
IH : Nat.binaryRec 0 (fun b x => bif b then Num.bit1 else Num.bit0) n = ↑n
⊢ (bif b then Num.bit1 else Num.bit0) ↑n = ↑(Nat.bit b n)

case h
α : Type u_1
b : Bool
n : ℕ
IH : Nat.binaryRec 0 (fun b x => bif b then Num.bit1 else Num.bit0) n = ↑n
⊢ (bif false then Num.bit1 else Num.bit0) 0 = 0

tactic: cases b <;> simp [Nat.bit, bit0_of_bit0, bit1_of_bit1, Nat.cast_bit0, Nat.cast_bit1]
state_before: α : Type u_1
b : Bool
n : ℕ
IH : Nat.binaryRec 0 (fun b x => bif b then Num.bit1 else Num.bit0) n = ↑n
⊢ (bif b then Num.bit1 else Num.bit0) ↑n = ↑(Nat.bit b n)
state_after: no goals

tactic: rfl
state_before: case h
α : Type u_1
b : Bool
n : ℕ
IH : Nat.binaryRec 0 (fun b x => bif b then Num.bit1 else Num.bit0) n = ↑n
⊢ (bif false then Num.bit1 else Num.bit0) 0 = 0
state_after: no goals
Theorem: Polynomial.comp_C
File: Mathlib/Algebra/Polynomial/Eval.lean

tactic: simp [comp, map_sum (C : R →+* _)]
state_before: R : Type u
S : Type v
T : Type w
ι : Type y
a b : R
m n : ℕ
inst✝ : Semiring R
p q r : R[X]
⊢ p.comp (C a) = C (eval a p)
state_after: no goals
Theorem: convexHull_neg
File: Mathlib/Analysis/Convex/Hull.lean

tactic: simp_rw [← image_neg]
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁴ : OrderedRing 𝕜
inst✝³ : AddCommGroup E
inst✝² : AddCommGroup F
inst✝¹ : Module 𝕜 E
inst✝ : Module 𝕜 F
s : Set E
⊢ -(convexHull 𝕜) s = (convexHull 𝕜) (-s)
state_after: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁴ : OrderedRing 𝕜
inst✝³ : AddCommGroup E
inst✝² : AddCommGroup F
inst✝¹ : Module 𝕜 E
inst✝ : Module 𝕜 F
s : Set E
⊢ Neg.neg '' (convexHull 𝕜) s = (convexHull 𝕜) (Neg.neg '' s)

tactic: exact AffineMap.image_convexHull (-1) _
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁴ : OrderedRing 𝕜
inst✝³ : AddCommGroup E
inst✝² : AddCommGroup F
inst✝¹ : Module 𝕜 E
inst✝ : Module 𝕜 F
s : Set E
⊢ Neg.neg '' (convexHull 𝕜) s = (convexHull 𝕜) (Neg.neg '' s)
state_after: no goals
Theorem: MonoidHom.ker_eq_bot_iff
File: Mathlib/Algebra/Group/Subgroup/Basic.lean

tactic: rwa [eq_iff, h, mem_bot, inv_mul_eq_one, eq_comm] at hxy
state_before: G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝⁶ : Group G
inst✝⁵ : Group G'
inst✝⁴ : Group G''
A : Type u_4
inst✝³ : AddGroup A
N : Type u_5
P : Type u_6
inst✝² : Group N
inst✝¹ : Group P
K : Subgroup G
M : Type u_7
inst✝ : MulOneClass M
f : G →* M
h : f.ker = ⊥
x y : G
hxy : f x = f y
⊢ x = y
state_after: no goals
Theorem: PartialHomeomorph.univBall_source
File: Mathlib/Analysis/NormedSpace/HomeomorphBall.lean

tactic: unfold univBall
state_before: E : Type u_1
inst✝³ : SeminormedAddCommGroup E
inst✝² : NormedSpace ℝ E
P : Type u_2
inst✝¹ : PseudoMetricSpace P
inst✝ : NormedAddTorsor E P
c : P
r : ℝ
⊢ (univBall c r).source = univ
state_after: E : Type u_1
inst✝³ : SeminormedAddCommGroup E
inst✝² : NormedSpace ℝ E
P : Type u_2
inst✝¹ : PseudoMetricSpace P
inst✝ : NormedAddTorsor E P
c : P
r : ℝ
⊢ (if h : 0 < r then univUnitBall.trans' (unitBallBall c r h) ⋯
      else (IsometryEquiv.vaddConst c).toHomeomorph.toPartialHomeomorph).source =
    univ

tactic: split_ifs <;> rfl
state_before: E : Type u_1
inst✝³ : SeminormedAddCommGroup E
inst✝² : NormedSpace ℝ E
P : Type u_2
inst✝¹ : PseudoMetricSpace P
inst✝ : NormedAddTorsor E P
c : P
r : ℝ
⊢ (if h : 0 < r then univUnitBall.trans' (unitBallBall c r h) ⋯
      else (IsometryEquiv.vaddConst c).toHomeomorph.toPartialHomeomorph).source =
    univ
state_after: no goals
Theorem: succ_mersenne
File: Mathlib/NumberTheory/LucasLehmer.lean

tactic: rw [mersenne, tsub_add_cancel_of_le]
state_before: k : ℕ
⊢ mersenne k + 1 = 2 ^ k
state_after: k : ℕ
⊢ 1 ≤ 2 ^ k

tactic: exact one_le_pow_of_one_le (by norm_num) k
state_before: k : ℕ
⊢ 1 ≤ 2 ^ k
state_after: no goals

tactic: norm_num
state_before: k : ℕ
⊢ 1 ≤ 2
state_after: no goals
Theorem: Real.Angle.toReal_eq_pi_iff
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean

tactic: rw [← toReal_inj, toReal_pi]
state_before: θ : Angle
⊢ θ.toReal = π ↔ θ = ↑π
state_after: no goals
Theorem: Finset.product_inter
File: Mathlib/Data/Finset/Prod.lean

tactic: ext ⟨x, y⟩
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
s s' : Finset α
t t' : Finset β
a : α
b : β
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
⊢ s ×ˢ (t ∩ t') = s ×ˢ t ∩ s ×ˢ t'
state_after: case a.mk
α : Type u_1
β : Type u_2
γ : Type u_3
s s' : Finset α
t t' : Finset β
a : α
b : β
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
x : α
y : β
⊢ (x, y) ∈ s ×ˢ (t ∩ t') ↔ (x, y) ∈ s ×ˢ t ∩ s ×ˢ t'

tactic: simp only [← and_and_left, mem_inter, mem_product]
state_before: case a.mk
α : Type u_1
β : Type u_2
γ : Type u_3
s s' : Finset α
t t' : Finset β
a : α
b : β
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
x : α
y : β
⊢ (x, y) ∈ s ×ˢ (t ∩ t') ↔ (x, y) ∈ s ×ˢ t ∩ s ×ˢ t'
state_after: no goals
Theorem: ack_succ_succ
File: Mathlib/Computability/Ackermann.lean

tactic: rw [ack]
state_before: m n : ℕ
⊢ ack (m + 1) (n + 1) = ack m (ack (m + 1) n)
state_after: no goals
Theorem: Matrix.IsDiag.neg
File: Mathlib/LinearAlgebra/Matrix/IsDiag.lean

tactic: intro i j h
state_before: α : Type u_1
β : Type u_2
R : Type u_3
n : Type u_4
m : Type u_5
inst✝ : AddGroup α
A : Matrix n n α
ha : A.IsDiag
⊢ (-A).IsDiag
state_after: α : Type u_1
β : Type u_2
R : Type u_3
n : Type u_4
m : Type u_5
inst✝ : AddGroup α
A : Matrix n n α
ha : A.IsDiag
i j : n
h : i ≠ j
⊢ (-A) i j = 0

tactic: simp [ha h]
state_before: α : Type u_1
β : Type u_2
R : Type u_3
n : Type u_4
m : Type u_5
inst✝ : AddGroup α
A : Matrix n n α
ha : A.IsDiag
i j : n
h : i ≠ j
⊢ (-A) i j = 0
state_after: no goals
Theorem: CategoryTheory.Limits.Types.pushoutCocone_inl_eq_inr_iff_of_isColimit
File: Mathlib/CategoryTheory/Limits/Shapes/Types.lean

tactic: rw [pushoutCocone_inl_eq_inr_iff_of_iso
  (Cocones.ext (IsColimit.coconePointUniqueUpToIso hc (Pushout.isColimitCocone f g))
  (by aesop_cat))]
state_before: S X₁ X₂ : Type u
f : S ⟶ X₁
g : S ⟶ X₂
c : PushoutCocone f g
hc : IsColimit c
h₁ : Injective f
x₁ : X₁
x₂ : X₂
⊢ c.inl x₁ = c.inr x₂ ↔ ∃ s, f s = x₁ ∧ g s = x₂
state_after: S X₁ X₂ : Type u
f : S ⟶ X₁
g : S ⟶ X₂
c : PushoutCocone f g
hc : IsColimit c
h₁ : Injective f
x₁ : X₁
x₂ : X₂
⊢ (Pushout.cocone f g).inl x₁ = (Pushout.cocone f g).inr x₂ ↔ ∃ s, f s = x₁ ∧ g s = x₂

tactic: have := (mono_iff_injective f).2 h₁
state_before: S X₁ X₂ : Type u
f : S ⟶ X₁
g : S ⟶ X₂
c : PushoutCocone f g
hc : IsColimit c
h₁ : Injective f
x₁ : X₁
x₂ : X₂
⊢ (Pushout.cocone f g).inl x₁ = (Pushout.cocone f g).inr x₂ ↔ ∃ s, f s = x₁ ∧ g s = x₂
state_after: S X₁ X₂ : Type u
f : S ⟶ X₁
g : S ⟶ X₂
c : PushoutCocone f g
hc : IsColimit c
h₁ : Injective f
x₁ : X₁
x₂ : X₂
this : Mono f
⊢ (Pushout.cocone f g).inl x₁ = (Pushout.cocone f g).inr x₂ ↔ ∃ s, f s = x₁ ∧ g s = x₂

tactic: apply Pushout.inl_eq_inr_iff
state_before: S X₁ X₂ : Type u
f : S ⟶ X₁
g : S ⟶ X₂
c : PushoutCocone f g
hc : IsColimit c
h₁ : Injective f
x₁ : X₁
x₂ : X₂
this : Mono f
⊢ (Pushout.cocone f g).inl x₁ = (Pushout.cocone f g).inr x₂ ↔ ∃ s, f s = x₁ ∧ g s = x₂
state_after: no goals

tactic: aesop_cat
state_before: S X₁ X₂ : Type u
f : S ⟶ X₁
g : S ⟶ X₂
c : PushoutCocone f g
hc : IsColimit c
h₁ : Injective f
x₁ : X₁
x₂ : X₂
⊢ ∀ (j : WalkingSpan),
    c.ι.app j ≫ (hc.coconePointUniqueUpToIso (Pushout.isColimitCocone f g)).hom = (Pushout.cocone f g).ι.app j
state_after: no goals