1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: BoxIntegral.Box.isSome_iff
File: Mathlib/Analysis/BoxIntegral/Box/Basic.lean

tactic: erw [Option.isSome]
state_before: ι : Type u_1
I J : Box ι
x y : ι → ℝ
⊢ Option.isSome ⊥ = true ↔ (↑⊥).Nonempty
state_after: ι : Type u_1
I J : Box ι
x y : ι → ℝ
⊢ (match ⊥ with
      | some val => true
      | none => false) =
      true ↔
    (↑⊥).Nonempty

tactic: simp
state_before: ι : Type u_1
I J : Box ι
x y : ι → ℝ
⊢ (match ⊥ with
      | some val => true
      | none => false) =
      true ↔
    (↑⊥).Nonempty
state_after: no goals

tactic: erw [Option.isSome]
state_before: ι : Type u_1
I✝ J : Box ι
x y : ι → ℝ
I : Box ι
⊢ Option.isSome ↑I = true ↔ (↑↑I).Nonempty
state_after: ι : Type u_1
I✝ J : Box ι
x y : ι → ℝ
I : Box ι
⊢ (match ↑I with
      | some val => true
      | none => false) =
      true ↔
    (↑↑I).Nonempty

tactic: simp [I.nonempty_coe]
state_before: ι : Type u_1
I✝ J : Box ι
x y : ι → ℝ
I : Box ι
⊢ (match ↑I with
      | some val => true
      | none => false) =
      true ↔
    (↑↑I).Nonempty
state_after: no goals
Theorem: MvPolynomial.mem_supported_vars
File: Mathlib/Algebra/MvPolynomial/Supported.lean

tactic: rw [mem_supported]
state_before: σ : Type u_1
τ : Type u_2
R : Type u
S : Type v
r : R
e : ℕ
n m : σ
inst✝ : CommSemiring R
p✝ q : MvPolynomial σ R
s t : Set σ
p : MvPolynomial σ R
⊢ p ∈ supported R ↑p.vars
state_after: no goals
Theorem: Cardinal.mk_diff_add_mk
File: Mathlib/SetTheory/Cardinal/Basic.lean

tactic: refine (mk_union_of_disjoint <| ?_).symm.trans <| by rw [diff_union_of_subset h]
state_before: α β : Type u
c : Cardinal.{?u.225378}
S T : Set α
h : T ⊆ S
⊢ #↑(S \ T) + #↑T = #↑S
state_after: α β : Type u
c : Cardinal.{?u.225378}
S T : Set α
h : T ⊆ S
⊢ Disjoint (S \ T) T

tactic: exact disjoint_sdiff_self_left
state_before: α β : Type u
c : Cardinal.{?u.225378}
S T : Set α
h : T ⊆ S
⊢ Disjoint (S \ T) T
state_after: no goals

tactic: rw [diff_union_of_subset h]
state_before: α β : Type u
c : Cardinal.{?u.225378}
S T : Set α
h : T ⊆ S
⊢ #↑(S \ T ∪ T) = #↑S
state_after: no goals
Theorem: variationOnFromTo.self
File: Mathlib/Analysis/BoundedVariation.lean

tactic: dsimp only [variationOnFromTo]
state_before: α : Type u_1
inst✝¹ : LinearOrder α
E : Type u_2
inst✝ : PseudoEMetricSpace E
f : α → E
s : Set α
a : α
⊢ variationOnFromTo f s a a = 0
state_after: α : Type u_1
inst✝¹ : LinearOrder α
E : Type u_2
inst✝ : PseudoEMetricSpace E
f : α → E
s : Set α
a : α
⊢ (if a ≤ a then (eVariationOn f (s ∩ Icc a a)).toReal else -(eVariationOn f (s ∩ Icc a a)).toReal) = 0

tactic: rw [if_pos le_rfl, Icc_self, eVariationOn.subsingleton, ENNReal.zero_toReal]
state_before: α : Type u_1
inst✝¹ : LinearOrder α
E : Type u_2
inst✝ : PseudoEMetricSpace E
f : α → E
s : Set α
a : α
⊢ (if a ≤ a then (eVariationOn f (s ∩ Icc a a)).toReal else -(eVariationOn f (s ∩ Icc a a)).toReal) = 0
state_after: case hs
α : Type u_1
inst✝¹ : LinearOrder α
E : Type u_2
inst✝ : PseudoEMetricSpace E
f : α → E
s : Set α
a : α
⊢ (s ∩ {a}).Subsingleton

tactic: exact fun x hx y hy => hx.2.trans hy.2.symm
state_before: case hs
α : Type u_1
inst✝¹ : LinearOrder α
E : Type u_2
inst✝ : PseudoEMetricSpace E
f : α → E
s : Set α
a : α
⊢ (s ∩ {a}).Subsingleton
state_after: no goals
Theorem: Cardinal.lt_cof_power
File: Mathlib/SetTheory/Cardinal/Cofinality.lean

tactic: have b0 : b ≠ 0 := (zero_lt_one.trans b1).ne'
state_before: α : Type u_1
r : α → α → Prop
a b : Cardinal.{u_2}
ha : ℵ₀ ≤ a
b1 : 1 < b
⊢ a < (b ^ a).ord.cof
state_after: α : Type u_1
r : α → α → Prop
a b : Cardinal.{u_2}
ha : ℵ₀ ≤ a
b1 : 1 < b
b0 : b ≠ 0
⊢ a < (b ^ a).ord.cof

tactic: apply lt_imp_lt_of_le_imp_le (power_le_power_left <| power_ne_zero a b0)
state_before: α : Type u_1
r : α → α → Prop
a b : Cardinal.{u_2}
ha : ℵ₀ ≤ a
b1 : 1 < b
b0 : b ≠ 0
⊢ a < (b ^ a).ord.cof
state_after: α : Type u_1
r : α → α → Prop
a b : Cardinal.{u_2}
ha : ℵ₀ ≤ a
b1 : 1 < b
b0 : b ≠ 0
⊢ (b ^ a) ^ a < (b ^ a) ^ (b ^ a).ord.cof

tactic: rw [← power_mul, mul_eq_self ha]
state_before: α : Type u_1
r : α → α → Prop
a b : Cardinal.{u_2}
ha : ℵ₀ ≤ a
b1 : 1 < b
b0 : b ≠ 0
⊢ (b ^ a) ^ a < (b ^ a) ^ (b ^ a).ord.cof
state_after: α : Type u_1
r : α → α → Prop
a b : Cardinal.{u_2}
ha : ℵ₀ ≤ a
b1 : 1 < b
b0 : b ≠ 0
⊢ b ^ a < (b ^ a) ^ (b ^ a).ord.cof

tactic: exact lt_power_cof (ha.trans <| (cantor' _ b1).le)
state_before: α : Type u_1
r : α → α → Prop
a b : Cardinal.{u_2}
ha : ℵ₀ ≤ a
b1 : 1 < b
b0 : b ≠ 0
⊢ b ^ a < (b ^ a) ^ (b ^ a).ord.cof
state_after: no goals
Theorem: Set.compl_iUnion₂
File: Mathlib/Data/Set/Lattice.lean

tactic: simp_rw [compl_iUnion]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
ι₂ : Sort u_6
κ : ι → Sort u_7
κ₁ : ι → Sort u_8
κ₂ : ι → Sort u_9
κ' : ι' → Sort u_10
s : (i : ι) → κ i → Set α
⊢ (⋃ i, ⋃ j, s i j)ᶜ = ⋂ i, ⋂ j, (s i j)ᶜ
state_after: no goals
Theorem: schnirelmannDensity_lt_iff
File: Mathlib/Combinatorics/Schnirelmann.lean

tactic: rw [← not_le, le_schnirelmannDensity_iff]
state_before: A : Set ℕ
inst✝ : DecidablePred fun x => x ∈ A
x : ℝ
⊢ schnirelmannDensity A < x ↔ ∃ n, 0 < n ∧ ↑(filter (fun x => x ∈ A) (Ioc 0 n)).card / ↑n < x
state_after: A : Set ℕ
inst✝ : DecidablePred fun x => x ∈ A
x : ℝ
⊢ (¬∀ (n : ℕ), 0 < n → x ≤ ↑(filter (fun x => x ∈ A) (Ioc 0 n)).card / ↑n) ↔
    ∃ n, 0 < n ∧ ↑(filter (fun x => x ∈ A) (Ioc 0 n)).card / ↑n < x

tactic: simp
state_before: A : Set ℕ
inst✝ : DecidablePred fun x => x ∈ A
x : ℝ
⊢ (¬∀ (n : ℕ), 0 < n → x ≤ ↑(filter (fun x => x ∈ A) (Ioc 0 n)).card / ↑n) ↔
    ∃ n, 0 < n ∧ ↑(filter (fun x => x ∈ A) (Ioc 0 n)).card / ↑n < x
state_after: no goals
Theorem: Nat.Primrec'.comp₂
File: Mathlib/Computability/Primrec.lean

tactic: simpa using hf.comp' (hg.cons <| hh.cons Primrec'.nil)
state_before: f : ℕ → ℕ → ℕ
hf : Primrec' fun v => f v.head v.tail.head
n : ℕ
g h : Vector ℕ n → ℕ
hg : Primrec' g
hh : Primrec' h
⊢ Primrec' fun v => f (g v) (h v)
state_after: no goals
Theorem: MvPolynomial.NewtonIdentities.pairMap_of_snd_mem_fst
File: Mathlib/RingTheory/MvPolynomial/NewtonIdentities.lean

tactic: simp [pairMap, h]
state_before: σ : Type u_1
inst✝² : Fintype σ
inst✝¹ : DecidableEq σ
R : Type u_2
inst✝ : CommRing R
t : Finset σ × σ
h : t.2 ∈ t.1
⊢ MvPolynomial.NewtonIdentities.pairMap σ t = (t.1.erase t.2, t.2)
state_after: no goals
Theorem: MeasureTheory.JordanDecomposition.toSignedMeasure_neg
File: Mathlib/MeasureTheory/Decomposition/Jordan.lean

tactic: ext1 i hi
state_before: α : Type u_1
β : Type u_2
inst✝ : MeasurableSpace α
j : JordanDecomposition α
⊢ (-j).toSignedMeasure = -j.toSignedMeasure
state_after: case h
α : Type u_1
β : Type u_2
inst✝ : MeasurableSpace α
j : JordanDecomposition α
i : Set α
hi : MeasurableSet i
⊢ ↑(-j).toSignedMeasure i = ↑(-j.toSignedMeasure) i

tactic: rw [neg_apply, toSignedMeasure, toSignedMeasure, toSignedMeasure_sub_apply hi,
  toSignedMeasure_sub_apply hi, neg_sub, neg_posPart, neg_negPart]
state_before: case h
α : Type u_1
β : Type u_2
inst✝ : MeasurableSpace α
j : JordanDecomposition α
i : Set α
hi : MeasurableSet i
⊢ ↑(-j).toSignedMeasure i = ↑(-j.toSignedMeasure) i
state_after: no goals
Theorem: FreeSemigroup.length_map
File: Mathlib/Algebra/Free.lean

tactic: simp only [map_mul, length_mul, *]
state_before: α : Type u
β : Type v
f : α → β
x✝ : FreeSemigroup α
x : α
y : FreeSemigroup α
hx : ((map f) (of x)).length = (of x).length
hy : ((map f) y).length = y.length
⊢ ((map f) (of x * y)).length = (of x * y).length
state_after: no goals
Theorem: CategoryTheory.mono_iff_exact_zero_left
File: Mathlib/Algebra/Homology/Exact.lean

tactic: simpa using h.epi
state_before: V : Type u
inst✝⁴ : Category.{v, u} V
inst✝³ : HasImages V
A B✝ C✝ D : V
f✝ : A ⟶ B✝
g : B✝ ⟶ C✝
h✝ : C✝ ⟶ D
inst✝² : HasZeroObject V
inst✝¹ : Preadditive V
inst✝ : HasKernels V
B C : V
f : B ⟶ C
h : Exact 0 f
⊢ Epi 0
state_after: no goals
Theorem: MvPolynomial.isLocalization_C_mk'
File: Mathlib/RingTheory/MvPolynomial/Localization.lean

tactic: simp_rw [IsLocalization.eq_mk'_iff_mul_eq, algebraMap_def, map_C, ← map_mul,
  IsLocalization.mk'_spec]
state_before: σ : Type u_1
R : Type u_2
inst✝³ : CommRing R
M : Submonoid R
S : Type u_3
inst✝² : CommRing S
inst✝¹ : Algebra R S
inst✝ : IsLocalization M S
a : R
m : ↥M
⊢ C (IsLocalization.mk' S a m) = IsLocalization.mk' (MvPolynomial σ S) (C a) ⟨C ↑m, ⋯⟩
state_after: no goals
Theorem: CompositionSeries.toList_sorted
File: Mathlib/Order/JordanHolder.lean

tactic: dsimp only [RelSeries.toList]
state_before: X : Type u
inst✝¹ : Lattice X
inst✝ : JordanHolderLattice X
s : CompositionSeries X
i j : Fin (toList s).length
h : i < j
⊢ (toList s).get i < (toList s).get j
state_after: X : Type u
inst✝¹ : Lattice X
inst✝ : JordanHolderLattice X
s : CompositionSeries X
i j : Fin (toList s).length
h : i < j
⊢ (List.ofFn s.toFun).get i < (List.ofFn s.toFun).get j

tactic: rw [List.get_ofFn, List.get_ofFn]
state_before: X : Type u
inst✝¹ : Lattice X
inst✝ : JordanHolderLattice X
s : CompositionSeries X
i j : Fin (toList s).length
h : i < j
⊢ (List.ofFn s.toFun).get i < (List.ofFn s.toFun).get j
state_after: X : Type u
inst✝¹ : Lattice X
inst✝ : JordanHolderLattice X
s : CompositionSeries X
i j : Fin (toList s).length
h : i < j
⊢ s.toFun (Fin.cast ⋯ i) < s.toFun (Fin.cast ⋯ j)

tactic: exact s.strictMono h
state_before: X : Type u
inst✝¹ : Lattice X
inst✝ : JordanHolderLattice X
s : CompositionSeries X
i j : Fin (toList s).length
h : i < j
⊢ s.toFun (Fin.cast ⋯ i) < s.toFun (Fin.cast ⋯ j)
state_after: no goals
Theorem: CategoryTheory.IsIso.Iso.inv_hom
File: Mathlib/CategoryTheory/Iso.lean

tactic: apply inv_eq_of_hom_inv_id
state_before: C : Type u
inst✝ : Category.{v, u} C
X Y Z : C
f✝ g : X ⟶ Y
h : Y ⟶ Z
f : X ≅ Y
⊢ inv f.hom = f.inv
state_after: case hom_inv_id
C : Type u
inst✝ : Category.{v, u} C
X Y Z : C
f✝ g : X ⟶ Y
h : Y ⟶ Z
f : X ≅ Y
⊢ f.hom ≫ f.inv = 𝟙 X

tactic: simp
state_before: case hom_inv_id
C : Type u
inst✝ : Category.{v, u} C
X Y Z : C
f✝ g : X ⟶ Y
h : Y ⟶ Z
f : X ≅ Y
⊢ f.hom ≫ f.inv = 𝟙 X
state_after: no goals
Theorem: PrimeMultiset.prod_ofPNatMultiset
File: Mathlib/Data/PNat/Factors.lean

tactic: dsimp [prod]
state_before: v : Multiset ℕ+
h : ∀ p ∈ v, p.Prime
⊢ (ofPNatMultiset v h).prod = v.prod
state_after: v : Multiset ℕ+
h : ∀ p ∈ v, p.Prime
⊢ (ofPNatMultiset v h).toPNatMultiset.prod = v.prod

tactic: rw [to_ofPNatMultiset]
state_before: v : Multiset ℕ+
h : ∀ p ∈ v, p.Prime
⊢ (ofPNatMultiset v h).toPNatMultiset.prod = v.prod
state_after: no goals
Theorem: LinearMap.linearIndependent_iff
File: Mathlib/LinearAlgebra/LinearIndependent.lean

tactic: simp only [hf_inj, disjoint_bot_right]
state_before: ι : Type u'
ι' : Type u_1
R : Type u_2
K : Type u_3
M : Type u_4
M' : Type u_5
M'' : Type u_6
V : Type u
V' : Type u_7
v : ι → M
inst✝⁶ : Semiring R
inst✝⁵ : AddCommMonoid M
inst✝⁴ : AddCommMonoid M'
inst✝³ : AddCommMonoid M''
inst✝² : Module R M
inst✝¹ : Module R M'
inst✝ : Module R M''
a b : R
x y : M
f : M →ₗ[R] M'
hf_inj : ker f = ⊥
h : LinearIndependent R v
⊢ Disjoint (span R (Set.range v)) (ker f)
state_after: no goals
Theorem: Filter.isCobounded_bot
File: Mathlib/Order/LiminfLimsup.lean

tactic: simp [IsCobounded]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r : α → α → Prop
f g : Filter α
⊢ IsCobounded r ⊥ ↔ ∃ b, ∀ (x : α), r b x
state_after: no goals
Theorem: WeierstrassCurve.Jacobian.eval_polynomial
File: Mathlib/AlgebraicGeometry/EllipticCurve/Jacobian.lean

tactic: rw [polynomial]
state_before: R : Type u
inst✝¹ : CommRing R
W' : Jacobian R
F : Type v
inst✝ : Field F
W : Jacobian F
P : Fin 3 → R
⊢ (eval P) W'.polynomial =
    P y ^ 2 + W'.a₁ * P x * P y * P z + W'.a₃ * P y * P z ^ 3 -
      (P x ^ 3 + W'.a₂ * P x ^ 2 * P z ^ 2 + W'.a₄ * P x * P z ^ 4 + W'.a₆ * P z ^ 6)
state_after: R : Type u
inst✝¹ : CommRing R
W' : Jacobian R
F : Type v
inst✝ : Field F
W : Jacobian F
P : Fin 3 → R
⊢ (eval P)
      (X y ^ 2 + C W'.a₁ * X x * X y * X z + C W'.a₃ * X y * X z ^ 3 -
        (X x ^ 3 + C W'.a₂ * X x ^ 2 * X z ^ 2 + C W'.a₄ * X x * X z ^ 4 + C W'.a₆ * X z ^ 6)) =
    P y ^ 2 + W'.a₁ * P x * P y * P z + W'.a₃ * P y * P z ^ 3 -
      (P x ^ 3 + W'.a₂ * P x ^ 2 * P z ^ 2 + W'.a₄ * P x * P z ^ 4 + W'.a₆ * P z ^ 6)

tactic: eval_simp
state_before: R : Type u
inst✝¹ : CommRing R
W' : Jacobian R
F : Type v
inst✝ : Field F
W : Jacobian F
P : Fin 3 → R
⊢ (eval P)
      (X y ^ 2 + C W'.a₁ * X x * X y * X z + C W'.a₃ * X y * X z ^ 3 -
        (X x ^ 3 + C W'.a₂ * X x ^ 2 * X z ^ 2 + C W'.a₄ * X x * X z ^ 4 + C W'.a₆ * X z ^ 6)) =
    P y ^ 2 + W'.a₁ * P x * P y * P z + W'.a₃ * P y * P z ^ 3 -
      (P x ^ 3 + W'.a₂ * P x ^ 2 * P z ^ 2 + W'.a₄ * P x * P z ^ 4 + W'.a₆ * P z ^ 6)
state_after: no goals
Theorem: Int.units_coe_mul_self
File: Mathlib/Data/Int/Order/Units.lean

tactic: rw [← Units.val_mul, units_mul_self, Units.val_one]
state_before: u : ℤˣ
⊢ ↑u * ↑u = 1
state_after: no goals
Theorem: induction_on_primes
File: Mathlib/RingTheory/UniqueFactorizationDomain.lean

tactic: apply UniqueFactorizationMonoid.induction_on_prime
state_before: α : Type u_1
P : ℕ → Prop
h₀ : P 0
h₁ : P 1
h : ∀ (p a : ℕ), Prime p → P a → P (p * a)
n : ℕ
⊢ P n
state_after: case h₁
α : Type u_1
P : ℕ → Prop
h₀ : P 0
h₁ : P 1
h : ∀ (p a : ℕ), Prime p → P a → P (p * a)
n : ℕ
⊢ P 0

case h₂
α : Type u_1
P : ℕ → Prop
h₀ : P 0
h₁ : P 1
h : ∀ (p a : ℕ), Prime p → P a → P (p * a)
n : ℕ
⊢ ∀ (x : ℕ), IsUnit x → P x

case h₃
α : Type u_1
P : ℕ → Prop
h₀ : P 0
h₁ : P 1
h : ∀ (p a : ℕ), Prime p → P a → P (p * a)
n : ℕ
⊢ ∀ (a p : ℕ), a ≠ 0 → _root_.Prime p → P a → P (p * a)

tactic: exact h₀
state_before: case h₁
α : Type u_1
P : ℕ → Prop
h₀ : P 0
h₁ : P 1
h : ∀ (p a : ℕ), Prime p → P a → P (p * a)
n : ℕ
⊢ P 0
state_after: no goals

tactic: intro n h
state_before: case h₂
α : Type u_1
P : ℕ → Prop
h₀ : P 0
h₁ : P 1
h : ∀ (p a : ℕ), Prime p → P a → P (p * a)
n : ℕ
⊢ ∀ (x : ℕ), IsUnit x → P x
state_after: case h₂
α : Type u_1
P : ℕ → Prop
h₀ : P 0
h₁ : P 1
h✝ : ∀ (p a : ℕ), Prime p → P a → P (p * a)
n✝ n : ℕ
h : IsUnit n
⊢ P n

tactic: rw [Nat.isUnit_iff.1 h]
state_before: case h₂
α : Type u_1
P : ℕ → Prop
h₀ : P 0
h₁ : P 1
h✝ : ∀ (p a : ℕ), Prime p → P a → P (p * a)
n✝ n : ℕ
h : IsUnit n
⊢ P n
state_after: case h₂
α : Type u_1
P : ℕ → Prop
h₀ : P 0
h₁ : P 1
h✝ : ∀ (p a : ℕ), Prime p → P a → P (p * a)
n✝ n : ℕ
h : IsUnit n
⊢ P 1

tactic: exact h₁
state_before: case h₂
α : Type u_1
P : ℕ → Prop
h₀ : P 0
h₁ : P 1
h✝ : ∀ (p a : ℕ), Prime p → P a → P (p * a)
n✝ n : ℕ
h : IsUnit n
⊢ P 1
state_after: no goals

tactic: exact fun a p _ hp ↦ h p a hp.nat_prime
state_before: case h₃
α : Type u_1
P : ℕ → Prop
h₀ : P 0
h₁ : P 1
h : ∀ (p a : ℕ), Prime p → P a → P (p * a)
n : ℕ
⊢ ∀ (a p : ℕ), a ≠ 0 → _root_.Prime p → P a → P (p * a)
state_after: no goals
Theorem: Nat.sInf_eq_zero
File: Mathlib/Data/Nat/Lattice.lean

tactic: cases eq_empty_or_nonempty s with
| inl h => subst h
           simp only [or_true_iff, eq_self_iff_true, iff_true_iff, iInf, InfSet.sInf,
                      mem_empty_iff_false, exists_false, dif_neg, not_false_iff]
| inr h => simp only [h.ne_empty, or_false_iff, Nat.sInf_def, h, Nat.find_eq_zero]
state_before: s : Set ℕ
⊢ sInf s = 0 ↔ 0 ∈ s ∨ s = ∅
state_after: no goals

tactic: subst h
state_before: case inl
s : Set ℕ
h : s = ∅
⊢ sInf s = 0 ↔ 0 ∈ s ∨ s = ∅
state_after: case inl

⊢ sInf ∅ = 0 ↔ 0 ∈ ∅ ∨ ∅ = ∅

tactic: simp only [or_true_iff, eq_self_iff_true, iff_true_iff, iInf, InfSet.sInf,
           mem_empty_iff_false, exists_false, dif_neg, not_false_iff]
state_before: case inl

⊢ sInf ∅ = 0 ↔ 0 ∈ ∅ ∨ ∅ = ∅
state_after: no goals

tactic: simp only [h.ne_empty, or_false_iff, Nat.sInf_def, h, Nat.find_eq_zero]
state_before: case inr
s : Set ℕ
h : s.Nonempty
⊢ sInf s = 0 ↔ 0 ∈ s ∨ s = ∅
state_after: no goals
Theorem: CategoryTheory.Limits.Pi.map_comp_map'
File: Mathlib/CategoryTheory/Limits/Shapes/Products.lean

tactic: ext
state_before: β : Type w
α : Type w₂
γ : Type w₃
C : Type u
inst✝³ : Category.{v, u} C
f g : α → C
h : β → C
inst✝² : HasProduct f
inst✝¹ : HasProduct g
inst✝ : HasProduct h
p : β → α
q : (a : α) → f a ⟶ g a
q' : (b : β) → g (p b) ⟶ h b
⊢ map q ≫ map' p q' = map' p fun b => q (p b) ≫ q' b
state_after: case h
β : Type w
α : Type w₂
γ : Type w₃
C : Type u
inst✝³ : Category.{v, u} C
f g : α → C
h : β → C
inst✝² : HasProduct f
inst✝¹ : HasProduct g
inst✝ : HasProduct h
p : β → α
q : (a : α) → f a ⟶ g a
q' : (b : β) → g (p b) ⟶ h b
b✝ : β
⊢ (map q ≫ map' p q') ≫ π h b✝ = (map' p fun b => q (p b) ≫ q' b) ≫ π h b✝

tactic: simp
state_before: case h
β : Type w
α : Type w₂
γ : Type w₃
C : Type u
inst✝³ : Category.{v, u} C
f g : α → C
h : β → C
inst✝² : HasProduct f
inst✝¹ : HasProduct g
inst✝ : HasProduct h
p : β → α
q : (a : α) → f a ⟶ g a
q' : (b : β) → g (p b) ⟶ h b
b✝ : β
⊢ (map q ≫ map' p q') ≫ π h b✝ = (map' p fun b => q (p b) ≫ q' b) ≫ π h b✝
state_after: no goals
Theorem: Nat.minSqFac_prime
File: Mathlib/Data/Nat/Squarefree.lean

tactic: have := minSqFac_has_prop n
state_before: s : Finset ℕ
m n✝ p n d : ℕ
h : n.minSqFac = some d
⊢ Prime d
state_after: s : Finset ℕ
m n✝ p n d : ℕ
h : n.minSqFac = some d
this : n.MinSqFacProp n.minSqFac
⊢ Prime d

tactic: rw [h] at this
state_before: s : Finset ℕ
m n✝ p n d : ℕ
h : n.minSqFac = some d
this : n.MinSqFacProp n.minSqFac
⊢ Prime d
state_after: s : Finset ℕ
m n✝ p n d : ℕ
h : n.minSqFac = some d
this : n.MinSqFacProp (some d)
⊢ Prime d

tactic: exact this.1
state_before: s : Finset ℕ
m n✝ p n d : ℕ
h : n.minSqFac = some d
this : n.MinSqFacProp (some d)
⊢ Prime d
state_after: no goals
Theorem: Prod.eq_iff_fst_eq_snd_eq
File: Mathlib/Data/Prod/Basic.lean

tactic: simp
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
p₁ : α
p₂ : β
q₁ : α
q₂ : β
⊢ (p₁, p₂) = (q₁, q₂) ↔ (p₁, p₂).fst = (q₁, q₂).fst ∧ (p₁, p₂).snd = (q₁, q₂).snd
state_after: no goals
Theorem: ball_eq'
File: Mathlib/Analysis/Normed/Group/Basic.lean

tactic: simp [dist_eq_norm_div]
state_before: 𝓕 : Type u_1
𝕜 : Type u_2
α : Type u_3
ι : Type u_4
κ : Type u_5
E : Type u_6
F : Type u_7
G : Type u_8
inst✝² : SeminormedGroup E
inst✝¹ : SeminormedGroup F
inst✝ : SeminormedGroup G
s : Set E
a✝ a₁ a₂ b b₁ b₂ : E
r r₁ r₂ : ℝ
y : E
ε : ℝ
a : E
⊢ a ∈ ball y ε ↔ a ∈ {x | ‖x / y‖ < ε}
state_after: no goals
Theorem: Multiset.erase_attach_map_val
File: Mathlib/Data/Multiset/Basic.lean

tactic: rw [Multiset.map_erase _ val_injective, attach_map_val]
state_before: α : Type u_1
β : Type v
γ : Type u_2
inst✝ : DecidableEq α
s✝ s : Multiset α
x : { x // x ∈ s }
⊢ map val (s.attach.erase x) = s.erase ↑x
state_after: no goals
Theorem: MvPolynomial.induction_on'
File: Mathlib/Algebra/MvPolynomial/Basic.lean

tactic: rwa [monomial_zero] at this
state_before: R : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ : Type u_1
a a' a₁ a₂ : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S₁
p✝ q : MvPolynomial σ R
P : MvPolynomial σ R → Prop
p : MvPolynomial σ R
h1 : ∀ (u : σ →₀ ℕ) (a : R), P ((monomial u) a)
h2 : ∀ (p q : MvPolynomial σ R), P p → P q → P (p + q)
this : P ((monomial 0) 0)
⊢ P 0
state_after: no goals
Theorem: List.rtake_concat_succ
File: Mathlib/Data/List/DropRight.lean

tactic: simp [rtake_eq_reverse_take_reverse]
state_before: α : Type u_1
p : α → Bool
l : List α
n : ℕ
x : α
⊢ (l ++ [x]).rtake (n + 1) = l.rtake n ++ [x]
state_after: no goals
Theorem: Filter.frequently_cocardinal
File: Mathlib/Order/Filter/Cocardinal.lean

tactic: simp only [Filter.Frequently, eventually_cocardinal, not_not,coe_setOf, not_lt]
state_before: ι α β : Type u
c : Cardinal.{u}
hreg : c.IsRegular
l : Filter α
p : α → Prop
⊢ (∃ᶠ (x : α) in cocardinal α hreg, p x) ↔ c ≤ #↑{x | p x}
state_after: no goals
Theorem: Nat.pow_eq_zero
File: Mathlib/Data/Nat/Defs.lean

tactic: simp
state_before: a✝ b c d m n k : ℕ
p q : ℕ → Prop
a : ℕ
⊢ a ^ 0 = 0 ↔ a = 0 ∧ 0 ≠ 0
state_after: no goals

tactic: rw [Nat.pow_succ, mul_eq_zero, Nat.pow_eq_zero]
state_before: a✝ b c d m n✝ k : ℕ
p q : ℕ → Prop
a n : ℕ
⊢ a ^ (n + 1) = 0 ↔ a = 0 ∧ n + 1 ≠ 0
state_after: a✝ b c d m n✝ k : ℕ
p q : ℕ → Prop
a n : ℕ
⊢ a = 0 ∧ n ≠ 0 ∨ a = 0 ↔ a = 0 ∧ n + 1 ≠ 0

tactic: omega
state_before: a✝ b c d m n✝ k : ℕ
p q : ℕ → Prop
a n : ℕ
⊢ a = 0 ∧ n ≠ 0 ∨ a = 0 ↔ a = 0 ∧ n + 1 ≠ 0
state_after: no goals
Theorem: inv_le_iff_one_le_mul'
File: Mathlib/Algebra/Order/Group/Defs.lean

tactic: rw [mul_inv_self]
state_before: α : Type u
inst✝² : Group α
inst✝¹ : LE α
inst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
a b c d : α
⊢ a * a⁻¹ ≤ a * b ↔ 1 ≤ a * b
state_after: no goals
Theorem: ENNReal.zero_rpow_of_neg
File: Mathlib/Analysis/SpecialFunctions/Pow/NNReal.lean

tactic: rw [← ENNReal.coe_zero, ← ENNReal.some_eq_coe]
state_before: y : ℝ
h : y < 0
⊢ 0 ^ y = ⊤
state_after: y : ℝ
h : y < 0
⊢ some 0 ^ y = ⊤

tactic: simp [h, ne_of_gt h]
state_before: y : ℝ
h : y < 0
⊢ (if 0 = 0 ∧ y < 0 then ⊤ else ↑(NNReal.rpow 0 y)) = ⊤
state_after: no goals
Theorem: symmDiff_symmDiff_cancel_left
File: Mathlib/Order/SymmDiff.lean

tactic: simp [← symmDiff_assoc]
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
π : ι → Type u_4
inst✝ : GeneralizedBooleanAlgebra α
a b c d : α
⊢ a ∆ (a ∆ b) = b
state_after: no goals
Theorem: Set.smul_inter_ne_empty_iff'
File: Mathlib/Data/Set/Pointwise/SMul.lean

tactic: simp_rw [smul_inter_ne_empty_iff, div_eq_mul_inv]
state_before: F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝¹ : Group α
inst✝ : MulAction α β
s✝ t✝ A B : Set β
a : α
x✝ : β
s t : Set α
x : α
⊢ x • s ∩ t ≠ ∅ ↔ ∃ a b, (a ∈ t ∧ b ∈ s) ∧ a / b = x
state_after: no goals
Theorem: Nat.triangle_succ
File: Mathlib/Data/Nat/Choose/Basic.lean

tactic: rw [← add_mul_div_left, Nat.mul_comm 2 n, ← Nat.mul_add, Nat.add_sub_cancel, Nat.mul_comm]
state_before: n : ℕ
⊢ (n + 1) * (n + 1 - 1) / 2 = n * (n - 1) / 2 + n
state_after: n : ℕ
⊢ n * (n + 1) / 2 = n * (n - 1 + 2) / 2

case H
n : ℕ
⊢ 0 < 2

tactic: cases n <;> rfl
state_before: n : ℕ
⊢ n * (n + 1) / 2 = n * (n - 1 + 2) / 2

case H
n : ℕ
⊢ 0 < 2
state_after: case H
n : ℕ
⊢ 0 < 2

tactic: apply zero_lt_succ
state_before: case H
n : ℕ
⊢ 0 < 2
state_after: no goals
Theorem: Finset.mem_ssubsets
File: Mathlib/Data/Finset/Powerset.lean

tactic: rw [ssubsets, mem_erase, mem_powerset, ssubset_iff_subset_ne, and_comm]
state_before: α : Type u_1
s✝ t✝ : Finset α
inst✝ : DecidableEq α
s t : Finset α
⊢ t ∈ s.ssubsets ↔ t ⊂ s
state_after: no goals
Theorem: Nat.nth_of_forall_not
File: Mathlib/Data/Nat/Nth.lean

tactic: have : setOf p ⊆ Finset.range n := by
  intro n' hn'
  contrapose! hp
  exact ⟨n', by simpa using hp, Set.mem_setOf.mp hn'⟩
state_before: p : ℕ → Prop
n : ℕ
hp : ∀ n' ≥ n, ¬p n'
⊢ nth p n = 0
state_after: p : ℕ → Prop
n : ℕ
hp : ∀ n' ≥ n, ¬p n'
this : setOf p ⊆ ↑(range n)
⊢ nth p n = 0

tactic: rw [nth_of_card_le ((finite_toSet _).subset this)]
state_before: p : ℕ → Prop
n : ℕ
hp : ∀ n' ≥ n, ¬p n'
this : setOf p ⊆ ↑(range n)
⊢ nth p n = 0
state_after: p : ℕ → Prop
n : ℕ
hp : ∀ n' ≥ n, ¬p n'
this : setOf p ⊆ ↑(range n)
⊢ ⋯.toFinset.card ≤ n

tactic: intro n' hn'
state_before: p : ℕ → Prop
n : ℕ
hp : ∀ n' ≥ n, ¬p n'
⊢ setOf p ⊆ ↑(range n)
state_after: p : ℕ → Prop
n : ℕ
hp : ∀ n' ≥ n, ¬p n'
n' : ℕ
hn' : n' ∈ setOf p
⊢ n' ∈ ↑(range n)

tactic: contrapose! hp
state_before: p : ℕ → Prop
n : ℕ
hp : ∀ n' ≥ n, ¬p n'
n' : ℕ
hn' : n' ∈ setOf p
⊢ n' ∈ ↑(range n)
state_after: p : ℕ → Prop
n n' : ℕ
hn' : n' ∈ setOf p
hp : n' ∉ ↑(range n)
⊢ ∃ n' ≥ n, p n'

tactic: exact ⟨n', by simpa using hp, Set.mem_setOf.mp hn'⟩
state_before: p : ℕ → Prop
n n' : ℕ
hn' : n' ∈ setOf p
hp : n' ∉ ↑(range n)
⊢ ∃ n' ≥ n, p n'
state_after: no goals

tactic: simpa using hp
state_before: p : ℕ → Prop
n n' : ℕ
hn' : n' ∈ setOf p
hp : n' ∉ ↑(range n)
⊢ n' ≥ n
state_after: no goals

tactic: refine (Finset.card_le_card ?_).trans_eq (Finset.card_range n)
state_before: p : ℕ → Prop
n : ℕ
hp : ∀ n' ≥ n, ¬p n'
this : setOf p ⊆ ↑(range n)
⊢ ⋯.toFinset.card ≤ n
state_after: p : ℕ → Prop
n : ℕ
hp : ∀ n' ≥ n, ¬p n'
this : setOf p ⊆ ↑(range n)
⊢ ⋯.toFinset ⊆ range n

tactic: exact Set.Finite.toFinset_subset.mpr this
state_before: p : ℕ → Prop
n : ℕ
hp : ∀ n' ≥ n, ¬p n'
this : setOf p ⊆ ↑(range n)
⊢ ⋯.toFinset ⊆ range n
state_after: no goals