1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: PrincipalIdealRing.isMaximal_of_irreducible
File: Mathlib/RingTheory/PrincipalIdealDomain.lean

tactic: rcases principal I with ⟨a, rfl⟩
state_before: R : Type u
M : Type v
inst✝¹ : CommRing R
inst✝ : IsPrincipalIdealRing R
p : R
hp : Irreducible p
I : Ideal R
hI : span R {p} < I
⊢ I = ⊤
state_after: case mk.intro
R : Type u
M : Type v
inst✝¹ : CommRing R
inst✝ : IsPrincipalIdealRing R
p : R
hp : Irreducible p
a : R
hI : span R {p} < span R {a}
⊢ span R {a} = ⊤

tactic: erw [Ideal.span_singleton_eq_top]
state_before: case mk.intro
R : Type u
M : Type v
inst✝¹ : CommRing R
inst✝ : IsPrincipalIdealRing R
p : R
hp : Irreducible p
a : R
hI : span R {p} < span R {a}
⊢ span R {a} = ⊤
state_after: case mk.intro
R : Type u
M : Type v
inst✝¹ : CommRing R
inst✝ : IsPrincipalIdealRing R
p : R
hp : Irreducible p
a : R
hI : span R {p} < span R {a}
⊢ IsUnit a

tactic: rcases Ideal.span_singleton_le_span_singleton.1 (le_of_lt hI) with ⟨b, rfl⟩
state_before: case mk.intro
R : Type u
M : Type v
inst✝¹ : CommRing R
inst✝ : IsPrincipalIdealRing R
p : R
hp : Irreducible p
a : R
hI : span R {p} < span R {a}
⊢ IsUnit a
state_after: case mk.intro.intro
R : Type u
M : Type v
inst✝¹ : CommRing R
inst✝ : IsPrincipalIdealRing R
a b : R
hp : Irreducible (a * b)
hI : span R {a * b} < span R {a}
⊢ IsUnit a

tactic: refine (of_irreducible_mul hp).resolve_right (mt (fun hb => ?_) (not_le_of_lt hI))
state_before: case mk.intro.intro
R : Type u
M : Type v
inst✝¹ : CommRing R
inst✝ : IsPrincipalIdealRing R
a b : R
hp : Irreducible (a * b)
hI : span R {a * b} < span R {a}
⊢ IsUnit a
state_after: case mk.intro.intro
R : Type u
M : Type v
inst✝¹ : CommRing R
inst✝ : IsPrincipalIdealRing R
a b : R
hp : Irreducible (a * b)
hI : span R {a * b} < span R {a}
hb : IsUnit b
⊢ span R {a} ≤ span R {a * b}

tactic: erw [Ideal.span_singleton_le_span_singleton, IsUnit.mul_right_dvd hb]
state_before: case mk.intro.intro
R : Type u
M : Type v
inst✝¹ : CommRing R
inst✝ : IsPrincipalIdealRing R
a b : R
hp : Irreducible (a * b)
hI : span R {a * b} < span R {a}
hb : IsUnit b
⊢ span R {a} ≤ span R {a * b}
state_after: no goals
Theorem: PartENat.lt_find_iff
File: Mathlib/Data/Nat/PartENat.lean

tactic: refine ⟨?_, lt_find P n⟩
state_before: P : ℕ → Prop
inst✝ : DecidablePred P
n : ℕ
⊢ ↑n < find P ↔ ∀ m ≤ n, ¬P m
state_after: P : ℕ → Prop
inst✝ : DecidablePred P
n : ℕ
⊢ ↑n < find P → ∀ m ≤ n, ¬P m

tactic: intro h m hm
state_before: P : ℕ → Prop
inst✝ : DecidablePred P
n : ℕ
⊢ ↑n < find P → ∀ m ≤ n, ¬P m
state_after: P : ℕ → Prop
inst✝ : DecidablePred P
n : ℕ
h : ↑n < find P
m : ℕ
hm : m ≤ n
⊢ ¬P m

tactic: by_cases H : (find P).Dom
state_before: P : ℕ → Prop
inst✝ : DecidablePred P
n : ℕ
h : ↑n < find P
m : ℕ
hm : m ≤ n
⊢ ¬P m
state_after: case pos
P : ℕ → Prop
inst✝ : DecidablePred P
n : ℕ
h : ↑n < find P
m : ℕ
hm : m ≤ n
H : (find P).Dom
⊢ ¬P m

case neg
P : ℕ → Prop
inst✝ : DecidablePred P
n : ℕ
h : ↑n < find P
m : ℕ
hm : m ≤ n
H : ¬(find P).Dom
⊢ ¬P m

tactic: apply Nat.find_min H
state_before: case pos
P : ℕ → Prop
inst✝ : DecidablePred P
n : ℕ
h : ↑n < find P
m : ℕ
hm : m ≤ n
H : (find P).Dom
⊢ ¬P m
state_after: case pos
P : ℕ → Prop
inst✝ : DecidablePred P
n : ℕ
h : ↑n < find P
m : ℕ
hm : m ≤ n
H : (find P).Dom
⊢ m < Nat.find H

tactic: rw [coe_lt_iff] at h
state_before: case pos
P : ℕ → Prop
inst✝ : DecidablePred P
n : ℕ
h : ↑n < find P
m : ℕ
hm : m ≤ n
H : (find P).Dom
⊢ m < Nat.find H
state_after: case pos
P : ℕ → Prop
inst✝ : DecidablePred P
n : ℕ
h : ∀ (h : (find P).Dom), n < (find P).get h
m : ℕ
hm : m ≤ n
H : (find P).Dom
⊢ m < Nat.find H

tactic: specialize h H
state_before: case pos
P : ℕ → Prop
inst✝ : DecidablePred P
n : ℕ
h : ∀ (h : (find P).Dom), n < (find P).get h
m : ℕ
hm : m ≤ n
H : (find P).Dom
⊢ m < Nat.find H
state_after: case pos
P : ℕ → Prop
inst✝ : DecidablePred P
n m : ℕ
hm : m ≤ n
H : (find P).Dom
h : n < (find P).get H
⊢ m < Nat.find H

tactic: exact lt_of_le_of_lt hm h
state_before: case pos
P : ℕ → Prop
inst✝ : DecidablePred P
n m : ℕ
hm : m ≤ n
H : (find P).Dom
h : n < (find P).get H
⊢ m < Nat.find H
state_after: no goals

tactic: exact not_exists.mp H m
state_before: case neg
P : ℕ → Prop
inst✝ : DecidablePred P
n : ℕ
h : ↑n < find P
m : ℕ
hm : m ≤ n
H : ¬(find P).Dom
⊢ ¬P m
state_after: no goals
Theorem: minpoly.zero
File: Mathlib/FieldTheory/Minpoly/Field.lean

tactic: simpa only [add_zero, C_0, sub_eq_add_neg, neg_zero, RingHom.map_zero] using eq_X_sub_C B (0 : A)
state_before: A : Type u_1
B : Type u_2
inst✝³ : Field A
inst✝² : Ring B
inst✝¹ : Algebra A B
x : B
inst✝ : Nontrivial B
⊢ minpoly A 0 = X
state_after: no goals
Theorem: Orientation.rotation_eq_self_iff
File: Mathlib/Geometry/Euclidean/Angle/Oriented/Rotation.lean

tactic: by_cases h : x = 0 <;> simp [h]
state_before: V : Type u_1
V' : Type u_2
inst✝⁵ : NormedAddCommGroup V
inst✝⁴ : NormedAddCommGroup V'
inst✝³ : InnerProductSpace ℝ V
inst✝² : InnerProductSpace ℝ V'
inst✝¹ : Fact (finrank ℝ V = 2)
inst✝ : Fact (finrank ℝ V' = 2)
o : Orientation ℝ V (Fin 2)
x : V
θ : Real.Angle
⊢ (o.rotation θ) x = x ↔ x = 0 ∨ θ = 0
state_after: no goals
Theorem: Finset.mem_inv'
File: Mathlib/Data/Finset/Pointwise.lean

tactic: simp [mem_inv, inv_eq_iff_eq_inv]
state_before: F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝¹ : DecidableEq α
inst✝ : InvolutiveInv α
s : Finset α
a : α
⊢ a ∈ s⁻¹ ↔ a⁻¹ ∈ s
state_after: no goals
Theorem: MvPolynomial.mapRange_eq_map
File: Mathlib/RingTheory/MvPolynomial/Basic.lean

tactic: rw [p.as_sum, Finsupp.mapRange_finset_sum, map_sum (map f)]
state_before: σ : Type u
R✝ : Type v
inst✝² : CommSemiring R✝
p✝ m : ℕ
R : Type u_1
S : Type u_2
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S
p : MvPolynomial σ R
f : R →+* S
⊢ Finsupp.mapRange ⇑f ⋯ p = (map f) p
state_after: σ : Type u
R✝ : Type v
inst✝² : CommSemiring R✝
p✝ m : ℕ
R : Type u_1
S : Type u_2
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S
p : MvPolynomial σ R
f : R →+* S
⊢ ∑ x ∈ p.support, Finsupp.mapRange ⇑f ⋯ ((monomial x) (coeff x p)) =
    ∑ x ∈ p.support, (map f) ((monomial x) (coeff x p))

tactic: refine Finset.sum_congr rfl fun n _ => ?_
state_before: σ : Type u
R✝ : Type v
inst✝² : CommSemiring R✝
p✝ m : ℕ
R : Type u_1
S : Type u_2
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S
p : MvPolynomial σ R
f : R →+* S
⊢ ∑ x ∈ p.support, Finsupp.mapRange ⇑f ⋯ ((monomial x) (coeff x p)) =
    ∑ x ∈ p.support, (map f) ((monomial x) (coeff x p))
state_after: σ : Type u
R✝ : Type v
inst✝² : CommSemiring R✝
p✝ m : ℕ
R : Type u_1
S : Type u_2
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S
p : MvPolynomial σ R
f : R →+* S
n : σ →₀ ℕ
x✝ : n ∈ p.support
⊢ Finsupp.mapRange ⇑f ⋯ ((monomial n) (coeff n p)) = (map f) ((monomial n) (coeff n p))

tactic: rw [map_monomial, ← single_eq_monomial, Finsupp.mapRange_single, single_eq_monomial]
state_before: σ : Type u
R✝ : Type v
inst✝² : CommSemiring R✝
p✝ m : ℕ
R : Type u_1
S : Type u_2
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S
p : MvPolynomial σ R
f : R →+* S
n : σ →₀ ℕ
x✝ : n ∈ p.support
⊢ Finsupp.mapRange ⇑f ⋯ ((monomial n) (coeff n p)) = (map f) ((monomial n) (coeff n p))
state_after: no goals
Theorem: exists_birkhoff_representation
File: Mathlib/Order/Birkhoff.lean

tactic: classical
cases nonempty_fintype α
exact ⟨{a : α // SupIrred a}, _, inferInstance, _, LatticeHom.birkhoffFinset_injective⟩
state_before: α✝ : Type u_1
inst✝⁵ : DistribLattice α✝
inst✝⁴ : OrderBot α✝
inst✝³ : Fintype α✝
inst✝² : DecidablePred SupIrred
α : Type u
inst✝¹ : Finite α
inst✝ : DistribLattice α
⊢ ∃ β x x_1 f, Injective ⇑f
state_after: no goals

tactic: cases nonempty_fintype α
state_before: α✝ : Type u_1
inst✝⁵ : DistribLattice α✝
inst✝⁴ : OrderBot α✝
inst✝³ : Fintype α✝
inst✝² : DecidablePred SupIrred
α : Type u
inst✝¹ : Finite α
inst✝ : DistribLattice α
⊢ ∃ β x x_1 f, Injective ⇑f
state_after: case intro
α✝ : Type u_1
inst✝⁵ : DistribLattice α✝
inst✝⁴ : OrderBot α✝
inst✝³ : Fintype α✝
inst✝² : DecidablePred SupIrred
α : Type u
inst✝¹ : Finite α
inst✝ : DistribLattice α
val✝ : Fintype α
⊢ ∃ β x x_1 f, Injective ⇑f

tactic: exact ⟨{a : α // SupIrred a}, _, inferInstance, _, LatticeHom.birkhoffFinset_injective⟩
state_before: case intro
α✝ : Type u_1
inst✝⁵ : DistribLattice α✝
inst✝⁴ : OrderBot α✝
inst✝³ : Fintype α✝
inst✝² : DecidablePred SupIrred
α : Type u
inst✝¹ : Finite α
inst✝ : DistribLattice α
val✝ : Fintype α
⊢ ∃ β x x_1 f, Injective ⇑f
state_after: no goals
Theorem: Finsupp.supported_inter
File: Mathlib/LinearAlgebra/Finsupp.lean

tactic: rw [Set.inter_eq_iInter, supported_iInter, iInf_bool_eq]
state_before: α : Type u_1
M : Type u_2
N : Type u_3
P : Type u_4
R : Type u_5
S : Type u_6
inst✝⁷ : Semiring R
inst✝⁶ : Semiring S
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
inst✝³ : AddCommMonoid N
inst✝² : Module R N
inst✝¹ : AddCommMonoid P
inst✝ : Module R P
s t : Set α
⊢ supported M R (s ∩ t) = supported M R s ⊓ supported M R t
state_after: α : Type u_1
M : Type u_2
N : Type u_3
P : Type u_4
R : Type u_5
S : Type u_6
inst✝⁷ : Semiring R
inst✝⁶ : Semiring S
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
inst✝³ : AddCommMonoid N
inst✝² : Module R N
inst✝¹ : AddCommMonoid P
inst✝ : Module R P
s t : Set α
⊢ supported M R (bif true then s else t) ⊓ supported M R (bif false then s else t) = supported M R s ⊓ supported M R t

tactic: rfl
state_before: α : Type u_1
M : Type u_2
N : Type u_3
P : Type u_4
R : Type u_5
S : Type u_6
inst✝⁷ : Semiring R
inst✝⁶ : Semiring S
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
inst✝³ : AddCommMonoid N
inst✝² : Module R N
inst✝¹ : AddCommMonoid P
inst✝ : Module R P
s t : Set α
⊢ supported M R (bif true then s else t) ⊓ supported M R (bif false then s else t) = supported M R s ⊓ supported M R t
state_after: no goals
Theorem: MeasureTheory.AEEqFun.comp_eq_mk
File: Mathlib/MeasureTheory/Function/AEEqFun.lean

tactic: rw [← comp_mk g hg f f.aestronglyMeasurable, mk_coeFn]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝³ : MeasurableSpace α
μ ν : Measure α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : TopologicalSpace δ
g : β → γ
hg : Continuous g
f : α →ₘ[μ] β
⊢ comp g hg f = mk (g ∘ ↑f) ⋯
state_after: no goals
Theorem: Submodule.unique_quotient_iff_eq_top
File: Mathlib/LinearAlgebra/Quotient.lean

tactic: rintro rfl
state_before: R : Type u_1
M : Type u_2
r : R
x y : M
inst✝² : Ring R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
p p' : Submodule R M
⊢ p = ⊤ → Nonempty (Unique (M ⧸ p))
state_after: R : Type u_1
M : Type u_2
r : R
x y : M
inst✝² : Ring R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
p' : Submodule R M
⊢ Nonempty (Unique (M ⧸ ⊤))

tactic: exact ⟨QuotientTop.unique⟩
state_before: R : Type u_1
M : Type u_2
r : R
x y : M
inst✝² : Ring R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
p' : Submodule R M
⊢ Nonempty (Unique (M ⧸ ⊤))
state_after: no goals
Theorem: gronwallBound_ε0
File: Mathlib/Analysis/ODE/Gronwall.lean

tactic: by_cases hK : K = 0
state_before: E : Type u_1
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
F : Type u_2
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
δ K x : ℝ
⊢ gronwallBound δ K 0 x = δ * rexp (K * x)
state_after: case pos
E : Type u_1
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
F : Type u_2
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
δ K x : ℝ
hK : K = 0
⊢ gronwallBound δ K 0 x = δ * rexp (K * x)

case neg
E : Type u_1
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
F : Type u_2
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
δ K x : ℝ
hK : ¬K = 0
⊢ gronwallBound δ K 0 x = δ * rexp (K * x)

tactic: simp only [gronwallBound_K0, hK, zero_mul, exp_zero, add_zero, mul_one]
state_before: case pos
E : Type u_1
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
F : Type u_2
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
δ K x : ℝ
hK : K = 0
⊢ gronwallBound δ K 0 x = δ * rexp (K * x)
state_after: no goals

tactic: simp only [gronwallBound_of_K_ne_0 hK, zero_div, zero_mul, add_zero]
state_before: case neg
E : Type u_1
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
F : Type u_2
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
δ K x : ℝ
hK : ¬K = 0
⊢ gronwallBound δ K 0 x = δ * rexp (K * x)
state_after: no goals
Theorem: Fintype.card_le_card_of_rightTotal_unique
File: Mathlib/Combinatorics/Enumerative/DoubleCounting.lean

tactic: simpa using h₁
state_before: α : Type u_1
β : Type u_2
inst✝¹ : Fintype α
inst✝ : Fintype β
r : α → β → Prop
h₁ : RightTotal r
h₂ : RightUnique r
⊢ ∀ b ∈ univ, ∃ a ∈ univ, r a b
state_after: no goals
Theorem: CategoryTheory.ShortComplex.moduleCat_exact_iff_ker_sub_range
File: Mathlib/Algebra/Homology/ShortComplex/ModuleCat.lean

tactic: rw [moduleCat_exact_iff]
state_before: R : Type u
inst✝ : Ring R
S : ShortComplex (ModuleCat R)
⊢ S.Exact ↔ LinearMap.ker S.g ≤ LinearMap.range S.f
state_after: R : Type u
inst✝ : Ring R
S : ShortComplex (ModuleCat R)
⊢ (∀ (x₂ : ↑S.X₂), S.g x₂ = 0 → ∃ x₁, S.f x₁ = x₂) ↔ LinearMap.ker S.g ≤ LinearMap.range S.f

tactic: constructor
state_before: R : Type u
inst✝ : Ring R
S : ShortComplex (ModuleCat R)
⊢ (∀ (x₂ : ↑S.X₂), S.g x₂ = 0 → ∃ x₁, S.f x₁ = x₂) ↔ LinearMap.ker S.g ≤ LinearMap.range S.f
state_after: case mp
R : Type u
inst✝ : Ring R
S : ShortComplex (ModuleCat R)
⊢ (∀ (x₂ : ↑S.X₂), S.g x₂ = 0 → ∃ x₁, S.f x₁ = x₂) → LinearMap.ker S.g ≤ LinearMap.range S.f

case mpr
R : Type u
inst✝ : Ring R
S : ShortComplex (ModuleCat R)
⊢ LinearMap.ker S.g ≤ LinearMap.range S.f → ∀ (x₂ : ↑S.X₂), S.g x₂ = 0 → ∃ x₁, S.f x₁ = x₂

tactic: intro h x₂ hx₂
state_before: case mp
R : Type u
inst✝ : Ring R
S : ShortComplex (ModuleCat R)
⊢ (∀ (x₂ : ↑S.X₂), S.g x₂ = 0 → ∃ x₁, S.f x₁ = x₂) → LinearMap.ker S.g ≤ LinearMap.range S.f
state_after: case mp
R : Type u
inst✝ : Ring R
S : ShortComplex (ModuleCat R)
h : ∀ (x₂ : ↑S.X₂), S.g x₂ = 0 → ∃ x₁, S.f x₁ = x₂
x₂ : ↑S.X₂
hx₂ : x₂ ∈ LinearMap.ker S.g
⊢ x₂ ∈ LinearMap.range S.f

tactic: exact h x₂ hx₂
state_before: case mp
R : Type u
inst✝ : Ring R
S : ShortComplex (ModuleCat R)
h : ∀ (x₂ : ↑S.X₂), S.g x₂ = 0 → ∃ x₁, S.f x₁ = x₂
x₂ : ↑S.X₂
hx₂ : x₂ ∈ LinearMap.ker S.g
⊢ x₂ ∈ LinearMap.range S.f
state_after: no goals

tactic: intro h x₂ hx₂
state_before: case mpr
R : Type u
inst✝ : Ring R
S : ShortComplex (ModuleCat R)
⊢ LinearMap.ker S.g ≤ LinearMap.range S.f → ∀ (x₂ : ↑S.X₂), S.g x₂ = 0 → ∃ x₁, S.f x₁ = x₂
state_after: case mpr
R : Type u
inst✝ : Ring R
S : ShortComplex (ModuleCat R)
h : LinearMap.ker S.g ≤ LinearMap.range S.f
x₂ : ↑S.X₂
hx₂ : S.g x₂ = 0
⊢ ∃ x₁, S.f x₁ = x₂

tactic: exact h hx₂
state_before: case mpr
R : Type u
inst✝ : Ring R
S : ShortComplex (ModuleCat R)
h : LinearMap.ker S.g ≤ LinearMap.range S.f
x₂ : ↑S.X₂
hx₂ : S.g x₂ = 0
⊢ ∃ x₁, S.f x₁ = x₂
state_after: no goals
Theorem: NNReal.IsConjExponent.mul_eq_add
File: Mathlib/Data/Real/ConjExponents.lean

tactic: simpa only [← NNReal.coe_mul, ← NNReal.coe_add, NNReal.coe_inj] using h.coe.mul_eq_add
state_before: a b p q : ℝ≥0
h : p.IsConjExponent q
⊢ p * q = p + q
state_after: no goals
Theorem: PNat.XgcdType.start_v
File: Mathlib/Data/PNat/Xgcd.lean

tactic: dsimp [start, v, XgcdType.a, XgcdType.b, w, z]
state_before: u : XgcdType
a b : ℕ+
⊢ (start a b).v = (↑a, ↑b)
state_after: u : XgcdType
a b : ℕ+
⊢ (1 * (↑a - 1 + 1) + 0 * (↑b - 1 + 1), 0 * (↑a - 1 + 1) + 1 * (↑b - 1 + 1)) = (↑a, ↑b)

tactic: rw [one_mul, one_mul, zero_mul, zero_mul]
state_before: u : XgcdType
a b : ℕ+
⊢ (1 * (↑a - 1 + 1) + 0 * (↑b - 1 + 1), 0 * (↑a - 1 + 1) + 1 * (↑b - 1 + 1)) = (↑a, ↑b)
state_after: u : XgcdType
a b : ℕ+
⊢ (↑a - 1 + 1 + 0, 0 + (↑b - 1 + 1)) = (↑a, ↑b)

tactic: have := a.pos
state_before: u : XgcdType
a b : ℕ+
⊢ (↑a - 1 + 1 + 0, 0 + (↑b - 1 + 1)) = (↑a, ↑b)
state_after: u : XgcdType
a b : ℕ+
this : 0 < ↑a
⊢ (↑a - 1 + 1 + 0, 0 + (↑b - 1 + 1)) = (↑a, ↑b)

tactic: have := b.pos
state_before: u : XgcdType
a b : ℕ+
this : 0 < ↑a
⊢ (↑a - 1 + 1 + 0, 0 + (↑b - 1 + 1)) = (↑a, ↑b)
state_after: u : XgcdType
a b : ℕ+
this✝ : 0 < ↑a
this : 0 < ↑b
⊢ (↑a - 1 + 1 + 0, 0 + (↑b - 1 + 1)) = (↑a, ↑b)

tactic: congr <;> omega
state_before: u : XgcdType
a b : ℕ+
this✝ : 0 < ↑a
this : 0 < ↑b
⊢ (↑a - 1 + 1 + 0, 0 + (↑b - 1 + 1)) = (↑a, ↑b)
state_after: no goals
Theorem: Filter.frequently_sSup
File: Mathlib/Order/Filter/Basic.lean

tactic: simp only [Filter.Frequently, not_forall, eventually_sSup, exists_prop]
state_before: α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
p : α → Prop
fs : Set (Filter α)
⊢ (∃ᶠ (x : α) in sSup fs, p x) ↔ ∃ f ∈ fs, ∃ᶠ (x : α) in f, p x
state_after: no goals
Theorem: Finset.not_disjoint_iff
File: Mathlib/Data/Finset/Basic.lean

tactic: rw [Classical.not_imp, not_not]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
f : α → β
s t u : Finset α
a b x✝ : α
⊢ ¬(x✝ ∈ s → x✝ ∉ t) ↔ x✝ ∈ s ∧ x✝ ∈ t
state_after: no goals
Theorem: Polynomial.coeff_zero_multiset_prod
File: Mathlib/Algebra/Polynomial/BigOperators.lean

tactic: refine Multiset.induction_on t ?_ fun a t ht => ?_
state_before: R : Type u
ι : Type w
s : Finset ι
inst✝ : CommSemiring R
f : ι → R[X]
t : Multiset R[X]
⊢ t.prod.coeff 0 = (Multiset.map (fun f => f.coeff 0) t).prod
state_after: case refine_1
R : Type u
ι : Type w
s : Finset ι
inst✝ : CommSemiring R
f : ι → R[X]
t : Multiset R[X]
⊢ (prod 0).coeff 0 = (Multiset.map (fun f => f.coeff 0) 0).prod

case refine_2
R : Type u
ι : Type w
s : Finset ι
inst✝ : CommSemiring R
f : ι → R[X]
t✝ : Multiset R[X]
a : R[X]
t : Multiset R[X]
ht : t.prod.coeff 0 = (Multiset.map (fun f => f.coeff 0) t).prod
⊢ (a ::ₘ t).prod.coeff 0 = (Multiset.map (fun f => f.coeff 0) (a ::ₘ t)).prod

tactic: rw [Multiset.prod_cons, Multiset.map_cons, Multiset.prod_cons, Polynomial.mul_coeff_zero, ht]
state_before: case refine_2
R : Type u
ι : Type w
s : Finset ι
inst✝ : CommSemiring R
f : ι → R[X]
t✝ : Multiset R[X]
a : R[X]
t : Multiset R[X]
ht : t.prod.coeff 0 = (Multiset.map (fun f => f.coeff 0) t).prod
⊢ (a ::ₘ t).prod.coeff 0 = (Multiset.map (fun f => f.coeff 0) (a ::ₘ t)).prod
state_after: no goals

tactic: simp
state_before: case refine_1
R : Type u
ι : Type w
s : Finset ι
inst✝ : CommSemiring R
f : ι → R[X]
t : Multiset R[X]
⊢ (prod 0).coeff 0 = (Multiset.map (fun f => f.coeff 0) 0).prod
state_after: no goals
Theorem: Int.testBit_lxor
File: Mathlib/Data/Int/Bitwise.lean

tactic: rw [← bitwise_xor, testBit_bitwise]
state_before: m n : ℤ
k : ℕ
⊢ (m.xor n).testBit k = xor (m.testBit k) (n.testBit k)
state_after: no goals
Theorem: schnirelmannDensity_le_of_not_mem
File: Mathlib/Combinatorics/Schnirelmann.lean

tactic: rcases k.eq_zero_or_pos with rfl | hk'
state_before: A : Set ℕ
inst✝ : DecidablePred fun x => x ∈ A
k : ℕ
hk : k ∉ A
⊢ schnirelmannDensity A ≤ 1 - (↑k)⁻¹
state_after: case inl
A : Set ℕ
inst✝ : DecidablePred fun x => x ∈ A
hk : 0 ∉ A
⊢ schnirelmannDensity A ≤ 1 - (↑0)⁻¹

case inr
A : Set ℕ
inst✝ : DecidablePred fun x => x ∈ A
k : ℕ
hk : k ∉ A
hk' : k > 0
⊢ schnirelmannDensity A ≤ 1 - (↑k)⁻¹

tactic: apply schnirelmannDensity_le_of_le k hk'.ne'
state_before: case inr
A : Set ℕ
inst✝ : DecidablePred fun x => x ∈ A
k : ℕ
hk : k ∉ A
hk' : k > 0
⊢ schnirelmannDensity A ≤ 1 - (↑k)⁻¹
state_after: case inr
A : Set ℕ
inst✝ : DecidablePred fun x => x ∈ A
k : ℕ
hk : k ∉ A
hk' : k > 0
⊢ ↑(filter (fun x => x ∈ A) (Ioc 0 k)).card / ↑k ≤ 1 - (↑k)⁻¹

tactic: rw [← one_div, one_sub_div (Nat.cast_pos.2 hk').ne']
state_before: case inr
A : Set ℕ
inst✝ : DecidablePred fun x => x ∈ A
k : ℕ
hk : k ∉ A
hk' : k > 0
⊢ ↑(filter (fun x => x ∈ A) (Ioc 0 k)).card / ↑k ≤ 1 - (↑k)⁻¹
state_after: case inr
A : Set ℕ
inst✝ : DecidablePred fun x => x ∈ A
k : ℕ
hk : k ∉ A
hk' : k > 0
⊢ ↑(filter (fun x => x ∈ A) (Ioc 0 k)).card / ↑k ≤ (↑k - 1) / ↑k

tactic: gcongr
state_before: case inr
A : Set ℕ
inst✝ : DecidablePred fun x => x ∈ A
k : ℕ
hk : k ∉ A
hk' : k > 0
⊢ ↑(filter (fun x => x ∈ A) (Ioc 0 k)).card / ↑k ≤ (↑k - 1) / ↑k
state_after: case inr.hab
A : Set ℕ
inst✝ : DecidablePred fun x => x ∈ A
k : ℕ
hk : k ∉ A
hk' : k > 0
⊢ ↑(filter (fun x => x ∈ A) (Ioc 0 k)).card ≤ ↑k - 1

tactic: rw [← Nat.cast_pred hk', Nat.cast_le]
state_before: case inr.hab
A : Set ℕ
inst✝ : DecidablePred fun x => x ∈ A
k : ℕ
hk : k ∉ A
hk' : k > 0
⊢ ↑(filter (fun x => x ∈ A) (Ioc 0 k)).card ≤ ↑k - 1
state_after: case inr.hab
A : Set ℕ
inst✝ : DecidablePred fun x => x ∈ A
k : ℕ
hk : k ∉ A
hk' : k > 0
⊢ (filter (fun x => x ∈ A) (Ioc 0 k)).card ≤ k - 1

tactic: rw [← Ioo_insert_right hk', filter_insert, if_neg hk]
state_before: case inr.hab
A : Set ℕ
inst✝ : DecidablePred fun x => x ∈ A
k : ℕ
hk : k ∉ A
hk' : k > 0
⊢ filter (fun x => x ∈ A) (Ioc 0 k) ⊆ Ioo 0 k
state_after: case inr.hab
A : Set ℕ
inst✝ : DecidablePred fun x => x ∈ A
k : ℕ
hk : k ∉ A
hk' : k > 0
⊢ filter (fun x => x ∈ A) (Ioo 0 k) ⊆ Ioo 0 k

tactic: exact filter_subset _ _
state_before: case inr.hab
A : Set ℕ
inst✝ : DecidablePred fun x => x ∈ A
k : ℕ
hk : k ∉ A
hk' : k > 0
⊢ filter (fun x => x ∈ A) (Ioo 0 k) ⊆ Ioo 0 k
state_after: no goals

tactic: simpa using schnirelmannDensity_le_one
state_before: case inl
A : Set ℕ
inst✝ : DecidablePred fun x => x ∈ A
hk : 0 ∉ A
⊢ schnirelmannDensity A ≤ 1 - (↑0)⁻¹
state_after: no goals

tactic: simp
state_before: A : Set ℕ
inst✝ : DecidablePred fun x => x ∈ A
k : ℕ
hk : k ∉ A
hk' : k > 0
this : filter (fun x => x ∈ A) (Ioc 0 k) ⊆ Ioo 0 k
⊢ (Ioo 0 k).card = k - 1
state_after: no goals
Theorem: Complex.isCauSeq_abs_exp
File: Mathlib/Data/Complex/Exponential.lean

tactic: rwa [div_lt_iff hn0, one_mul]
state_before: z : ℂ
n : ℕ
hn : abs z < ↑n
hn0 : 0 < ↑n
⊢ abs z / ↑n < 1
state_after: no goals

tactic: rw [abs_abs, abs_abs, Nat.factorial_succ, pow_succ', mul_comm m.succ, Nat.cast_mul, ← div_div,
  mul_div_assoc, mul_div_right_comm, map_mul, map_div₀, abs_natCast]
state_before: z : ℂ
n : ℕ
hn : abs z < ↑n
hn0 : 0 < ↑n
m : ℕ
hm : n ≤ m
⊢ |abs (z ^ m.succ / ↑m.succ.factorial)| ≤ abs z / ↑n * |abs (z ^ m / ↑m.factorial)|
state_after: z : ℂ
n : ℕ
hn : abs z < ↑n
hn0 : 0 < ↑n
m : ℕ
hm : n ≤ m
⊢ abs z / ↑m.succ * abs (z ^ m / ↑m.factorial) ≤ abs z / ↑n * abs (z ^ m / ↑m.factorial)

tactic: gcongr
state_before: z : ℂ
n : ℕ
hn : abs z < ↑n
hn0 : 0 < ↑n
m : ℕ
hm : n ≤ m
⊢ abs z / ↑m.succ * abs (z ^ m / ↑m.factorial) ≤ abs z / ↑n * abs (z ^ m / ↑m.factorial)
state_after: case h.h.h
z : ℂ
n : ℕ
hn : abs z < ↑n
hn0 : 0 < ↑n
m : ℕ
hm : n ≤ m
⊢ n ≤ m.succ

tactic: exact le_trans hm (Nat.le_succ _)
state_before: case h.h.h
z : ℂ
n : ℕ
hn : abs z < ↑n
hn0 : 0 < ↑n
m : ℕ
hm : n ≤ m
⊢ n ≤ m.succ
state_after: no goals
Theorem: Polynomial.Chebyshev.U_neg_two
File: Mathlib/RingTheory/Polynomial/Chebyshev.lean

tactic: simpa [zero_sub, Int.reduceNeg, U_neg_one, mul_zero, U_zero] using U_sub_two R 0
state_before: R : Type u_1
S : Type u_2
inst✝¹ : CommRing R
inst✝ : CommRing S
⊢ U R (-2) = -1
state_after: no goals
Theorem: forall_existsUnique_iff'
File: Mathlib/Logic/Function/Basic.lean

tactic: simp [forall_existsUnique_iff, Function.funext_iff]
state_before: α : Sort u_1
β : Sort u_2
r : α → β → Prop
⊢ (∀ (a : α), ∃! b, r a b) ↔ ∃ f, r = fun x x_1 => f x = x_1
state_after: no goals