1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: List.map_reverseAux
File: Mathlib/Data/List/Basic.lean

tactic: simp only [reverseAux_eq, map_append, map_reverse]
state_before: ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁✝ l₂✝ : List α
f : α → β
l₁ l₂ : List α
⊢ map f (l₁.reverseAux l₂) = (map f l₁).reverseAux (map f l₂)
state_after: no goals
Theorem: Set.Finite.toFinset_ssubset
File: Mathlib/Data/Set/Finite.lean

tactic: rw [← Finset.coe_ssubset, Finite.coe_toFinset]
state_before: α : Type u
β : Type v
ι : Sort w
γ : Type x
s t✝ : Set α
a : α
hs : s.Finite
ht : t✝.Finite
t : Finset α
⊢ hs.toFinset ⊂ t ↔ s ⊂ ↑t
state_after: no goals
Theorem: CategoryTheory.Exact.epi_kernel_lift
File: Mathlib/Algebra/Homology/Exact.lean

tactic: rw [← factorThruKernelSubobject_comp_kernelSubobjectIso]
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✝¹ : HasZeroMorphisms V
inst✝ : HasEqualizers V
h : Exact f g
⊢ Epi (kernel.lift g f ⋯)
state_after: 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✝¹ : HasZeroMorphisms V
inst✝ : HasEqualizers V
h : Exact f g
⊢ Epi (factorThruKernelSubobject g f ⋯ ≫ (kernelSubobjectIso g).hom)

tactic: haveI := h.epi_factorThruKernelSubobject
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✝¹ : HasZeroMorphisms V
inst✝ : HasEqualizers V
h : Exact f g
⊢ Epi (factorThruKernelSubobject g f ⋯ ≫ (kernelSubobjectIso g).hom)
state_after: 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✝¹ : HasZeroMorphisms V
inst✝ : HasEqualizers V
h : Exact f g
this : Epi (factorThruKernelSubobject g f ⋯)
⊢ Epi (factorThruKernelSubobject g f ⋯ ≫ (kernelSubobjectIso g).hom)

tactic: apply epi_comp
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✝¹ : HasZeroMorphisms V
inst✝ : HasEqualizers V
h : Exact f g
this : Epi (factorThruKernelSubobject g f ⋯)
⊢ Epi (factorThruKernelSubobject g f ⋯ ≫ (kernelSubobjectIso g).hom)
state_after: no goals
Theorem: PrimeSpectrum.isClosed_range_comap_of_surjective
File: Mathlib/AlgebraicGeometry/PrimeSpectrum/Basic.lean

tactic: rw [range_comap_of_surjective _ f hf]
state_before: R : Type u
S : Type v
inst✝¹ : CommRing R
inst✝ : CommRing S
f : R →+* S
hf : Surjective ⇑f
⊢ IsClosed (Set.range ⇑(comap f))
state_after: R : Type u
S : Type v
inst✝¹ : CommRing R
inst✝ : CommRing S
f : R →+* S
hf : Surjective ⇑f
⊢ IsClosed (zeroLocus ↑(ker f))

tactic: exact isClosed_zeroLocus _
state_before: R : Type u
S : Type v
inst✝¹ : CommRing R
inst✝ : CommRing S
f : R →+* S
hf : Surjective ⇑f
⊢ IsClosed (zeroLocus ↑(ker f))
state_after: no goals
Theorem: AlgebraicGeometry.LocallyRingedSpace.isUnit_res_toΓSpecMapBasicOpen
File: Mathlib/AlgebraicGeometry/GammaSpecAdjunction.lean

tactic: convert
  (X.presheaf.map <| (eqToHom <| X.toΓSpecMapBasicOpen_eq r).op).isUnit_map
    (X.toRingedSpace.isUnit_res_basicOpen r)
state_before: X : LocallyRingedSpace
r : ↑(Γ.obj { unop := X })
⊢ IsUnit ((X.toToΓSpecMapBasicOpen r) r)
state_after: case h.e'_3
X : LocallyRingedSpace
r : ↑(Γ.obj { unop := X })
⊢ (X.toToΓSpecMapBasicOpen r) r = (X.presheaf.map (eqToHom ⋯).op) ((X.toRingedSpace.presheaf.map (homOfLE ⋯).op) r)

tactic: erw [← comp_apply, ← Functor.map_comp]
state_before: case h.e'_3
X : LocallyRingedSpace
r : ↑(Γ.obj { unop := X })
⊢ (X.toToΓSpecMapBasicOpen r) r = (X.presheaf.map (eqToHom ⋯).op) ((X.toRingedSpace.presheaf.map (homOfLE ⋯).op) r)
state_after: case h.e'_3
X : LocallyRingedSpace
r : ↑(Γ.obj { unop := X })
⊢ (X.toToΓSpecMapBasicOpen r) r = (X.toRingedSpace.presheaf.map ((homOfLE ⋯).op ≫ (eqToHom ⋯).op)) r

tactic: congr
state_before: case h.e'_3
X : LocallyRingedSpace
r : ↑(Γ.obj { unop := X })
⊢ (X.toToΓSpecMapBasicOpen r) r = (X.toRingedSpace.presheaf.map ((homOfLE ⋯).op ≫ (eqToHom ⋯).op)) r
state_after: no goals
Theorem: SimplexCategory.eq_δ_of_mono
File: Mathlib/AlgebraicTopology/SimplexCategory.lean

tactic: rcases eq_comp_δ_of_not_surjective θ (by
  by_contra h
  simpa using le_of_epi (epi_iff_surjective.mpr h)) with ⟨i, θ', h⟩
state_before: n : ℕ
θ : [n] ⟶ [n + 1]
inst✝ : Mono θ
⊢ ∃ i, θ = δ i
state_after: case intro.intro
n : ℕ
θ : [n] ⟶ [n + 1]
inst✝ : Mono θ
i : Fin (n + 2)
θ' : [n] ⟶ [n]
h : θ = θ' ≫ δ i
⊢ ∃ i, θ = δ i

tactic: use i
state_before: case intro.intro
n : ℕ
θ : [n] ⟶ [n + 1]
inst✝ : Mono θ
i : Fin (n + 2)
θ' : [n] ⟶ [n]
h : θ = θ' ≫ δ i
⊢ ∃ i, θ = δ i
state_after: case h
n : ℕ
θ : [n] ⟶ [n + 1]
inst✝ : Mono θ
i : Fin (n + 2)
θ' : [n] ⟶ [n]
h : θ = θ' ≫ δ i
⊢ θ = δ i

tactic: haveI : Mono (θ' ≫ δ i) := by
  rw [← h]
  infer_instance
state_before: case h
n : ℕ
θ : [n] ⟶ [n + 1]
inst✝ : Mono θ
i : Fin (n + 2)
θ' : [n] ⟶ [n]
h : θ = θ' ≫ δ i
⊢ θ = δ i
state_after: case h
n : ℕ
θ : [n] ⟶ [n + 1]
inst✝ : Mono θ
i : Fin (n + 2)
θ' : [n] ⟶ [n]
h : θ = θ' ≫ δ i
this : Mono (θ' ≫ δ i)
⊢ θ = δ i

tactic: haveI := CategoryTheory.mono_of_mono θ' (δ i)
state_before: case h
n : ℕ
θ : [n] ⟶ [n + 1]
inst✝ : Mono θ
i : Fin (n + 2)
θ' : [n] ⟶ [n]
h : θ = θ' ≫ δ i
this : Mono (θ' ≫ δ i)
⊢ θ = δ i
state_after: case h
n : ℕ
θ : [n] ⟶ [n + 1]
inst✝ : Mono θ
i : Fin (n + 2)
θ' : [n] ⟶ [n]
h : θ = θ' ≫ δ i
this✝ : Mono (θ' ≫ δ i)
this : Mono θ'
⊢ θ = δ i

tactic: rw [h, eq_id_of_mono θ', Category.id_comp]
state_before: case h
n : ℕ
θ : [n] ⟶ [n + 1]
inst✝ : Mono θ
i : Fin (n + 2)
θ' : [n] ⟶ [n]
h : θ = θ' ≫ δ i
this✝ : Mono (θ' ≫ δ i)
this : Mono θ'
⊢ θ = δ i
state_after: no goals

tactic: by_contra h
state_before: n : ℕ
θ : [n] ⟶ [n + 1]
inst✝ : Mono θ
⊢ ¬Function.Surjective ⇑(Hom.toOrderHom θ)
state_after: n : ℕ
θ : [n] ⟶ [n + 1]
inst✝ : Mono θ
h : Function.Surjective ⇑(Hom.toOrderHom θ)
⊢ False

tactic: simpa using le_of_epi (epi_iff_surjective.mpr h)
state_before: n : ℕ
θ : [n] ⟶ [n + 1]
inst✝ : Mono θ
h : Function.Surjective ⇑(Hom.toOrderHom θ)
⊢ False
state_after: no goals

tactic: rw [← h]
state_before: n : ℕ
θ : [n] ⟶ [n + 1]
inst✝ : Mono θ
i : Fin (n + 2)
θ' : [n] ⟶ [n]
h : θ = θ' ≫ δ i
⊢ Mono (θ' ≫ δ i)
state_after: n : ℕ
θ : [n] ⟶ [n + 1]
inst✝ : Mono θ
i : Fin (n + 2)
θ' : [n] ⟶ [n]
h : θ = θ' ≫ δ i
⊢ Mono θ

tactic: infer_instance
state_before: n : ℕ
θ : [n] ⟶ [n + 1]
inst✝ : Mono θ
i : Fin (n + 2)
θ' : [n] ⟶ [n]
h : θ = θ' ≫ δ i
⊢ Mono θ
state_after: no goals
Theorem: Nat.binaryRec_of_ne_zero
File: Mathlib/Data/Nat/Bitwise.lean

tactic: rw [Eq.rec_eq_cast]
state_before: f✝ : Bool → Bool → Bool
C : ℕ → Sort u_1
z : C 0
f : (b : Bool) → (n : ℕ) → C n → C (bit b n)
n : ℕ
h : n ≠ 0
⊢ binaryRec z f n = ⋯ ▸ f n.bodd n.div2 (binaryRec z f n.div2)
state_after: f✝ : Bool → Bool → Bool
C : ℕ → Sort u_1
z : C 0
f : (b : Bool) → (n : ℕ) → C n → C (bit b n)
n : ℕ
h : n ≠ 0
⊢ binaryRec z f n = cast ⋯ (f n.bodd n.div2 (binaryRec z f n.div2))

tactic: rw [binaryRec]
state_before: f✝ : Bool → Bool → Bool
C : ℕ → Sort u_1
z : C 0
f : (b : Bool) → (n : ℕ) → C n → C (bit b n)
n : ℕ
h : n ≠ 0
⊢ binaryRec z f n = cast ⋯ (f n.bodd n.div2 (binaryRec z f n.div2))
state_after: f✝ : Bool → Bool → Bool
C : ℕ → Sort u_1
z : C 0
f : (b : Bool) → (n : ℕ) → C n → C (bit b n)
n : ℕ
h : n ≠ 0
⊢ (if n0 : n = 0 then ⋯.mpr z
    else
      let n' := n.div2;
      let_fun _x := ⋯;
      ⋯.mpr (f n.bodd n' (binaryRec z f n'))) =
    cast ⋯ (f n.bodd n.div2 (binaryRec z f n.div2))

tactic: dsimp only
state_before: f✝ : Bool → Bool → Bool
C : ℕ → Sort u_1
z : C 0
f : (b : Bool) → (n : ℕ) → C n → C (bit b n)
n : ℕ
h : n ≠ 0
⊢ (if n0 : n = 0 then ⋯.mpr z
    else
      let n' := n.div2;
      let_fun _x := ⋯;
      ⋯.mpr (f n.bodd n' (binaryRec z f n'))) =
    cast ⋯ (f n.bodd n.div2 (binaryRec z f n.div2))
state_after: f✝ : Bool → Bool → Bool
C : ℕ → Sort u_1
z : C 0
f : (b : Bool) → (n : ℕ) → C n → C (bit b n)
n : ℕ
h : n ≠ 0
⊢ (if n0 : n = 0 then ⋯.mpr z else ⋯.mpr (f n.bodd n.div2 (binaryRec z f n.div2))) =
    cast ⋯ (f n.bodd n.div2 (binaryRec z f n.div2))

tactic: rw [dif_neg h, eq_mpr_eq_cast]
state_before: f✝ : Bool → Bool → Bool
C : ℕ → Sort u_1
z : C 0
f : (b : Bool) → (n : ℕ) → C n → C (bit b n)
n : ℕ
h : n ≠ 0
⊢ (if n0 : n = 0 then ⋯.mpr z else ⋯.mpr (f n.bodd n.div2 (binaryRec z f n.div2))) =
    cast ⋯ (f n.bodd n.div2 (binaryRec z f n.div2))
state_after: no goals
Theorem: InnerProductGeometry.sin_eq_zero_iff_angle_eq_zero_or_angle_eq_pi
File: Mathlib/Geometry/Euclidean/Angle/Unoriented/Basic.lean

tactic: rw [sin_eq_zero_iff_cos_eq, cos_eq_one_iff_angle_eq_zero, cos_eq_neg_one_iff_angle_eq_pi]
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x y : V
⊢ sin (angle x y) = 0 ↔ angle x y = 0 ∨ angle x y = π
state_after: no goals
Theorem: MeasureTheory.FiniteMeasure.zero_testAgainstNN_apply
File: Mathlib/MeasureTheory/Measure/FiniteMeasure.lean

tactic: simp only [testAgainstNN, toMeasure_zero, lintegral_zero_measure, ENNReal.zero_toNNReal]
state_before: Ω : Type u_1
inst✝⁵ : MeasurableSpace Ω
R : Type u_2
inst✝⁴ : SMul R ℝ≥0
inst✝³ : SMul R ℝ≥0∞
inst✝² : IsScalarTower R ℝ≥0 ℝ≥0∞
inst✝¹ : IsScalarTower R ℝ≥0∞ ℝ≥0∞
inst✝ : TopologicalSpace Ω
f : Ω →ᵇ ℝ≥0
⊢ testAgainstNN 0 f = 0
state_after: no goals
Theorem: Filter.isCountablyGenerated_iff_exists_antitone_basis
File: Mathlib/Order/Filter/Bases.lean

tactic: constructor
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Sort u_5
f : Filter α
⊢ f.IsCountablyGenerated ↔ ∃ x, f.HasAntitoneBasis x
state_after: case mp
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Sort u_5
f : Filter α
⊢ f.IsCountablyGenerated → ∃ x, f.HasAntitoneBasis x

case mpr
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Sort u_5
f : Filter α
⊢ (∃ x, f.HasAntitoneBasis x) → f.IsCountablyGenerated

tactic: intro h
state_before: case mp
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Sort u_5
f : Filter α
⊢ f.IsCountablyGenerated → ∃ x, f.HasAntitoneBasis x
state_after: case mp
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Sort u_5
f : Filter α
h : f.IsCountablyGenerated
⊢ ∃ x, f.HasAntitoneBasis x

tactic: exact f.exists_antitone_basis
state_before: case mp
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Sort u_5
f : Filter α
h : f.IsCountablyGenerated
⊢ ∃ x, f.HasAntitoneBasis x
state_after: no goals

tactic: rintro ⟨x, h⟩
state_before: case mpr
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Sort u_5
f : Filter α
⊢ (∃ x, f.HasAntitoneBasis x) → f.IsCountablyGenerated
state_after: case mpr.intro
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Sort u_5
f : Filter α
x : ℕ → Set α
h : f.HasAntitoneBasis x
⊢ f.IsCountablyGenerated

tactic: rw [h.1.eq_iInf]
state_before: case mpr.intro
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Sort u_5
f : Filter α
x : ℕ → Set α
h : f.HasAntitoneBasis x
⊢ f.IsCountablyGenerated
state_after: case mpr.intro
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Sort u_5
f : Filter α
x : ℕ → Set α
h : f.HasAntitoneBasis x
⊢ (⨅ i, 𝓟 (x i)).IsCountablyGenerated

tactic: exact isCountablyGenerated_seq x
state_before: case mpr.intro
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Sort u_5
f : Filter α
x : ℕ → Set α
h : f.HasAntitoneBasis x
⊢ (⨅ i, 𝓟 (x i)).IsCountablyGenerated
state_after: no goals
Theorem: Real.Angle.tan_zero
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean

tactic: rw [← coe_zero, tan_coe, Real.tan_zero]
state_before: ⊢ tan 0 = 0
state_after: no goals
Theorem: EReal.div_self
File: Mathlib/Data/Real/EReal.lean

tactic: rw [← coe_toReal h₂ h₁] at h₃ ⊢
state_before: a : EReal
h₁ : a ≠ ⊥
h₂ : a ≠ ⊤
h₃ : a ≠ 0
⊢ a / a = 1
state_after: a : EReal
h₁ : a ≠ ⊥
h₂ : a ≠ ⊤
h₃ : ↑a.toReal ≠ 0
⊢ ↑a.toReal / ↑a.toReal = 1

tactic: rw [← coe_div, _root_.div_self (coe_ne_zero.1 h₃), coe_one]
state_before: a : EReal
h₁ : a ≠ ⊥
h₂ : a ≠ ⊤
h₃ : ↑a.toReal ≠ 0
⊢ ↑a.toReal / ↑a.toReal = 1
state_after: no goals
Theorem: bind₁_xInTermsOfW_wittPolynomial
File: Mathlib/RingTheory/WittVector/WittPolynomial.lean

tactic: rw [wittPolynomial_eq_sum_C_mul_X_pow, AlgHom.map_sum]
state_before: p : ℕ
R : Type u_1
inst✝² : CommRing R
inst✝¹ : DecidableEq R
inst✝ : Invertible ↑p
k : ℕ
⊢ (bind₁ (xInTermsOfW p R)) (W_ R k) = X k
state_after: p : ℕ
R : Type u_1
inst✝² : CommRing R
inst✝¹ : DecidableEq R
inst✝ : Invertible ↑p
k : ℕ
⊢ ∑ x ∈ range (k + 1), (bind₁ (xInTermsOfW p R)) (C (↑p ^ x) * X x ^ p ^ (k - x)) = X k

tactic: simp only [Nat.cast_pow, AlgHom.map_pow, C_pow, AlgHom.map_mul, algHom_C, algebraMap_eq]
state_before: p : ℕ
R : Type u_1
inst✝² : CommRing R
inst✝¹ : DecidableEq R
inst✝ : Invertible ↑p
k : ℕ
⊢ ∑ x ∈ range (k + 1), (bind₁ (xInTermsOfW p R)) (C (↑p ^ x) * X x ^ p ^ (k - x)) = X k
state_after: p : ℕ
R : Type u_1
inst✝² : CommRing R
inst✝¹ : DecidableEq R
inst✝ : Invertible ↑p
k : ℕ
⊢ ∑ x ∈ range (k + 1), C ↑p ^ x * (bind₁ (xInTermsOfW p R)) (X x) ^ p ^ (k - x) = X k

tactic: rw [sum_range_succ_comm, tsub_self, pow_zero, pow_one, bind₁_X_right, mul_comm, ← C_pow,
  xInTermsOfW_aux]
state_before: p : ℕ
R : Type u_1
inst✝² : CommRing R
inst✝¹ : DecidableEq R
inst✝ : Invertible ↑p
k : ℕ
⊢ ∑ x ∈ range (k + 1), C ↑p ^ x * (bind₁ (xInTermsOfW p R)) (X x) ^ p ^ (k - x) = X k
state_after: p : ℕ
R : Type u_1
inst✝² : CommRing R
inst✝¹ : DecidableEq R
inst✝ : Invertible ↑p
k : ℕ
⊢ X k - ∑ i ∈ range k, C (↑p ^ i) * xInTermsOfW p R i ^ p ^ (k - i) +
      ∑ x ∈ range k, C ↑p ^ x * (bind₁ (xInTermsOfW p R)) (X x) ^ p ^ (k - x) =
    X k

tactic: simp only [Nat.cast_pow, C_pow, bind₁_X_right, sub_add_cancel]
state_before: p : ℕ
R : Type u_1
inst✝² : CommRing R
inst✝¹ : DecidableEq R
inst✝ : Invertible ↑p
k : ℕ
⊢ X k - ∑ i ∈ range k, C (↑p ^ i) * xInTermsOfW p R i ^ p ^ (k - i) +
      ∑ x ∈ range k, C ↑p ^ x * (bind₁ (xInTermsOfW p R)) (X x) ^ p ^ (k - x) =
    X k
state_after: no goals
Theorem: Polynomial.IsRoot.map
File: Mathlib/Algebra/Polynomial/Eval.lean

tactic: rw [IsRoot, eval_map, eval₂_hom, h.eq_zero, f.map_zero]
state_before: R : Type u
S : Type v
T : Type w
ι : Type y
a b : R
m n : ℕ
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S
f✝ f : R →+* S
x : R
p : R[X]
h : p.IsRoot x
⊢ (Polynomial.map f p).IsRoot (f x)
state_after: no goals
Theorem: IsBaseChange.equiv_symm_apply
File: Mathlib/RingTheory/IsTensorProduct.lean

tactic: rw [h.equiv.symm_apply_eq, h.equiv_tmul, one_smul]
state_before: R : Type u_1
M : Type v₁
N : Type v₂
S : Type v₃
inst✝¹² : AddCommMonoid M
inst✝¹¹ : AddCommMonoid N
inst✝¹⁰ : CommSemiring R
inst✝⁹ : CommSemiring S
inst✝⁸ : Algebra R S
inst✝⁷ : Module R M
inst✝⁶ : Module R N
inst✝⁵ : Module S N
inst✝⁴ : IsScalarTower R S N
f : M →ₗ[R] N
h : IsBaseChange S f
P : Type u_2
Q : Type u_3
inst✝³ : AddCommMonoid P
inst✝² : Module R P
inst✝¹ : AddCommMonoid Q
inst✝ : Module S Q
m : M
⊢ h.equiv.symm (f m) = 1 ⊗ₜ[R] m
state_after: no goals
Theorem: Finset.Ioo_insert_left
File: Mathlib/Order/Interval/Finset/Basic.lean

tactic: rw [← coe_inj, coe_insert, coe_Ioo, coe_Ico, Set.insert_eq, Set.union_comm, Set.Ioo_union_left h]
state_before: ι : Type u_1
α : Type u_2
inst✝² : PartialOrder α
inst✝¹ : LocallyFiniteOrder α
a b c : α
inst✝ : DecidableEq α
h : a < b
⊢ insert a (Ioo a b) = Ico a b
state_after: no goals
Theorem: Ideal.prime_of_isPrime
File: Mathlib/RingTheory/DedekindDomain/Ideal.lean

tactic: refine ⟨hP, mt Ideal.isUnit_iff.mp h.ne_top, fun I J hIJ => ?_⟩
state_before: R : Type u_1
A : Type u_2
K : Type u_3
inst✝⁵ : CommRing R
inst✝⁴ : CommRing A
inst✝³ : Field K
inst✝² : IsDedekindDomain A
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
P : Ideal A
hP : P ≠ ⊥
h : P.IsPrime
⊢ Prime P
state_after: R : Type u_1
A : Type u_2
K : Type u_3
inst✝⁵ : CommRing R
inst✝⁴ : CommRing A
inst✝³ : Field K
inst✝² : IsDedekindDomain A
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
P : Ideal A
hP : P ≠ ⊥
h : P.IsPrime
I J : Ideal A
hIJ : P ∣ I * J
⊢ P ∣ I ∨ P ∣ J

tactic: simpa only [Ideal.dvd_iff_le] using h.mul_le.mp (Ideal.le_of_dvd hIJ)
state_before: R : Type u_1
A : Type u_2
K : Type u_3
inst✝⁵ : CommRing R
inst✝⁴ : CommRing A
inst✝³ : Field K
inst✝² : IsDedekindDomain A
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
P : Ideal A
hP : P ≠ ⊥
h : P.IsPrime
I J : Ideal A
hIJ : P ∣ I * J
⊢ P ∣ I ∨ P ∣ J
state_after: no goals
Theorem: round_two_inv
File: Mathlib/Algebra/Order/Floor.lean

tactic: simp only [round_eq, ← one_div, add_halves', floor_one]
state_before: F : Type u_1
α : Type u_2
β : Type u_3
inst✝¹ : LinearOrderedField α
inst✝ : FloorRing α
⊢ round 2⁻¹ = 1
state_after: no goals
Theorem: CategoryTheory.Limits.pushoutIsoUnopPullback_inv_snd
File: Mathlib/CategoryTheory/Limits/Opposites.lean

tactic: apply Quiver.Hom.unop_inj
state_before: C : Type u₁
inst✝³ : Category.{v₁, u₁} C
J : Type u₂
inst✝² : Category.{v₂, u₂} J
X✝ : Type v₂
X Y Z : C
f : X ⟶ Z
g : X ⟶ Y
inst✝¹ : HasPushout f g
inst✝ : HasPullback f.op g.op
⊢ (pushoutIsoUnopPullback f g).inv.op ≫ pullback.snd = pushout.inr.op
state_after: case a
C : Type u₁
inst✝³ : Category.{v₁, u₁} C
J : Type u₂
inst✝² : Category.{v₂, u₂} J
X✝ : Type v₂
X Y Z : C
f : X ⟶ Z
g : X ⟶ Y
inst✝¹ : HasPushout f g
inst✝ : HasPullback f.op g.op
⊢ ((pushoutIsoUnopPullback f g).inv.op ≫ pullback.snd).unop = pushout.inr.op.unop

tactic: dsimp
state_before: case a
C : Type u₁
inst✝³ : Category.{v₁, u₁} C
J : Type u₂
inst✝² : Category.{v₂, u₂} J
X✝ : Type v₂
X Y Z : C
f : X ⟶ Z
g : X ⟶ Y
inst✝¹ : HasPushout f g
inst✝ : HasPullback f.op g.op
⊢ ((pushoutIsoUnopPullback f g).inv.op ≫ pullback.snd).unop = pushout.inr.op.unop
state_after: case a
C : Type u₁
inst✝³ : Category.{v₁, u₁} C
J : Type u₂
inst✝² : Category.{v₂, u₂} J
X✝ : Type v₂
X Y Z : C
f : X ⟶ Z
g : X ⟶ Y
inst✝¹ : HasPushout f g
inst✝ : HasPullback f.op g.op
⊢ pullback.snd.unop ≫ (pushoutIsoUnopPullback f g).inv = pushout.inr

tactic: rw [← pushoutIsoUnopPullback_inr_hom, Category.assoc, Iso.hom_inv_id, Category.comp_id]
state_before: case a
C : Type u₁
inst✝³ : Category.{v₁, u₁} C
J : Type u₂
inst✝² : Category.{v₂, u₂} J
X✝ : Type v₂
X Y Z : C
f : X ⟶ Z
g : X ⟶ Y
inst✝¹ : HasPushout f g
inst✝ : HasPullback f.op g.op
⊢ pullback.snd.unop ≫ (pushoutIsoUnopPullback f g).inv = pushout.inr
state_after: no goals
Theorem: List.IsPrefix.head_eq
File: Mathlib/Data/List/Infix.lean

tactic: cases x <;> cases y <;> simp only [head_cons, ne_eq, not_true_eq_false] at hx ⊢
state_before: α : Type u_1
β : Type u_2
l l₁ l₂ l₃ : List α
a b : α
m n : ℕ
x y : List α
h : x <+: y
hx : x ≠ []
⊢ x.head hx = y.head ⋯
state_after: case cons.nil
α : Type u_1
β : Type u_2
l l₁ l₂ l₃ : List α
a b : α
m n : ℕ
head✝ : α
tail✝ : List α
hx✝ : head✝ :: tail✝ ≠ []
h : head✝ :: tail✝ <+: []
hx : ¬False
⊢ head✝ = [].head ⋯

case cons.cons
α : Type u_1
β : Type u_2
l l₁ l₂ l₃ : List α
a b : α
m n : ℕ
head✝¹ : α
tail✝¹ : List α
head✝ : α
tail✝ : List α
h : head✝¹ :: tail✝¹ <+: head✝ :: tail✝
hx : ¬False
⊢ head✝¹ = head✝

tactic: all_goals (obtain ⟨_, h⟩ := h; injection h)
state_before: case cons.nil
α : Type u_1
β : Type u_2
l l₁ l₂ l₃ : List α
a b : α
m n : ℕ
head✝ : α
tail✝ : List α
hx✝ : head✝ :: tail✝ ≠ []
h : head✝ :: tail✝ <+: []
hx : ¬False
⊢ head✝ = [].head ⋯

case cons.cons
α : Type u_1
β : Type u_2
l l₁ l₂ l₃ : List α
a b : α
m n : ℕ
head✝¹ : α
tail✝¹ : List α
head✝ : α
tail✝ : List α
h : head✝¹ :: tail✝¹ <+: head✝ :: tail✝
hx : ¬False
⊢ head✝¹ = head✝
state_after: no goals

tactic: (obtain ⟨_, h⟩ := h; injection h)
state_before: case cons.cons
α : Type u_1
β : Type u_2
l l₁ l₂ l₃ : List α
a b : α
m n : ℕ
head✝¹ : α
tail✝¹ : List α
head✝ : α
tail✝ : List α
h : head✝¹ :: tail✝¹ <+: head✝ :: tail✝
hx : ¬False
⊢ head✝¹ = head✝
state_after: no goals

tactic: obtain ⟨_, h⟩ := h
state_before: case cons.cons
α : Type u_1
β : Type u_2
l l₁ l₂ l₃ : List α
a b : α
m n : ℕ
head✝¹ : α
tail✝¹ : List α
head✝ : α
tail✝ : List α
h : head✝¹ :: tail✝¹ <+: head✝ :: tail✝
hx : ¬False
⊢ head✝¹ = head✝
state_after: case cons.cons.intro
α : Type u_1
β : Type u_2
l l₁ l₂ l₃ : List α
a b : α
m n : ℕ
head✝¹ : α
tail✝¹ : List α
head✝ : α
tail✝ : List α
hx : ¬False
w✝ : List α
h : head✝¹ :: tail✝¹ ++ w✝ = head✝ :: tail✝
⊢ head✝¹ = head✝

tactic: injection h
state_before: case cons.cons.intro
α : Type u_1
β : Type u_2
l l₁ l₂ l₃ : List α
a b : α
m n : ℕ
head✝¹ : α
tail✝¹ : List α
head✝ : α
tail✝ : List α
hx : ¬False
w✝ : List α
h : head✝¹ :: tail✝¹ ++ w✝ = head✝ :: tail✝
⊢ head✝¹ = head✝
state_after: no goals
Theorem: CategoryTheory.ShortComplex.LeftHomologyData.τ₁_ofEpiOfIsIsoOfMono_f'
File: Mathlib/Algebra/Homology/ShortComplex/LeftHomology.lean

tactic: rw [← cancel_mono (ofEpiOfIsIsoOfMono φ h).i, assoc, f'_i,
  ofEpiOfIsIsoOfMono_i, f'_i_assoc, φ.comm₁₂]
state_before: C : Type u_1
inst✝⁴ : Category.{u_2, u_1} C
inst✝³ : HasZeroMorphisms C
S S₁ S₂ S₃ : ShortComplex C
φ : S₁ ⟶ S₂
h : S₁.LeftHomologyData
inst✝² : Epi φ.τ₁
inst✝¹ : IsIso φ.τ₂
inst✝ : Mono φ.τ₃
⊢ φ.τ₁ ≫ (ofEpiOfIsIsoOfMono φ h).f' = h.f'
state_after: no goals
Theorem: CategoryTheory.MonoidalCategory.prodMonoidal_leftUnitor_inv_fst
File: Mathlib/CategoryTheory/Monoidal/Category.lean

tactic: cases X
state_before: C : Type u
𝒞 : Category.{v, u} C
inst✝⁴ : MonoidalCategory C
C₁ : Type u₁
inst✝³ : Category.{v₁, u₁} C₁
inst✝² : MonoidalCategory C₁
C₂ : Type u₂
inst✝¹ : Category.{v₂, u₂} C₂
inst✝ : MonoidalCategory C₂
X : C₁ × C₂
⊢ (λ_ X).inv.1 = (λ_ X.1).inv
state_after: case mk
C : Type u
𝒞 : Category.{v, u} C
inst✝⁴ : MonoidalCategory C
C₁ : Type u₁
inst✝³ : Category.{v₁, u₁} C₁
inst✝² : MonoidalCategory C₁
C₂ : Type u₂
inst✝¹ : Category.{v₂, u₂} C₂
inst✝ : MonoidalCategory C₂
fst✝ : C₁
snd✝ : C₂
⊢ (λ_ (fst✝, snd✝)).inv.1 = (λ_ (fst✝, snd✝).1).inv

tactic: rfl
state_before: case mk
C : Type u
𝒞 : Category.{v, u} C
inst✝⁴ : MonoidalCategory C
C₁ : Type u₁
inst✝³ : Category.{v₁, u₁} C₁
inst✝² : MonoidalCategory C₁
C₂ : Type u₂
inst✝¹ : Category.{v₂, u₂} C₂
inst✝ : MonoidalCategory C₂
fst✝ : C₁
snd✝ : C₂
⊢ (λ_ (fst✝, snd✝)).inv.1 = (λ_ (fst✝, snd✝).1).inv
state_after: no goals
Theorem: Pell.pos_generator_iff_fundamental
File: Mathlib/NumberTheory/Pell.lean

tactic: refine ⟨fun h => ?_, fun H => ⟨H.1, H.2.1, H.eq_zpow_or_neg_zpow⟩⟩
state_before: d : ℤ
a : Solution₁ d
⊢ (1 < a.x ∧ 0 < a.y ∧ ∀ (b : Solution₁ d), ∃ n, b = a ^ n ∨ b = -a ^ n) ↔ IsFundamental a
state_after: d : ℤ
a : Solution₁ d
h : 1 < a.x ∧ 0 < a.y ∧ ∀ (b : Solution₁ d), ∃ n, b = a ^ n ∨ b = -a ^ n
⊢ IsFundamental a

tactic: have h₀ := d_pos_of_one_lt_x h.1
state_before: d : ℤ
a : Solution₁ d
h : 1 < a.x ∧ 0 < a.y ∧ ∀ (b : Solution₁ d), ∃ n, b = a ^ n ∨ b = -a ^ n
⊢ IsFundamental a
state_after: d : ℤ
a : Solution₁ d
h : 1 < a.x ∧ 0 < a.y ∧ ∀ (b : Solution₁ d), ∃ n, b = a ^ n ∨ b = -a ^ n
h₀ : 0 < d
⊢ IsFundamental a

tactic: have hd := d_nonsquare_of_one_lt_x h.1
state_before: d : ℤ
a : Solution₁ d
h : 1 < a.x ∧ 0 < a.y ∧ ∀ (b : Solution₁ d), ∃ n, b = a ^ n ∨ b = -a ^ n
h₀ : 0 < d
⊢ IsFundamental a
state_after: d : ℤ
a : Solution₁ d
h : 1 < a.x ∧ 0 < a.y ∧ ∀ (b : Solution₁ d), ∃ n, b = a ^ n ∨ b = -a ^ n
h₀ : 0 < d
hd : ¬IsSquare d
⊢ IsFundamental a

tactic: obtain ⟨a₁, ha₁⟩ := IsFundamental.exists_of_not_isSquare h₀ hd
state_before: d : ℤ
a : Solution₁ d
h : 1 < a.x ∧ 0 < a.y ∧ ∀ (b : Solution₁ d), ∃ n, b = a ^ n ∨ b = -a ^ n
h₀ : 0 < d
hd : ¬IsSquare d
⊢ IsFundamental a
state_after: case intro
d : ℤ
a : Solution₁ d
h : 1 < a.x ∧ 0 < a.y ∧ ∀ (b : Solution₁ d), ∃ n, b = a ^ n ∨ b = -a ^ n
h₀ : 0 < d
hd : ¬IsSquare d
a₁ : Solution₁ d
ha₁ : IsFundamental a₁
⊢ IsFundamental a

tactic: obtain ⟨b, -, hb₂⟩ := existsUnique_pos_generator h₀ hd
state_before: case intro
d : ℤ
a : Solution₁ d
h : 1 < a.x ∧ 0 < a.y ∧ ∀ (b : Solution₁ d), ∃ n, b = a ^ n ∨ b = -a ^ n
h₀ : 0 < d
hd : ¬IsSquare d
a₁ : Solution₁ d
ha₁ : IsFundamental a₁
⊢ IsFundamental a
state_after: case intro.intro.intro
d : ℤ
a : Solution₁ d
h : 1 < a.x ∧ 0 < a.y ∧ ∀ (b : Solution₁ d), ∃ n, b = a ^ n ∨ b = -a ^ n
h₀ : 0 < d
hd : ¬IsSquare d
a₁ : Solution₁ d
ha₁ : IsFundamental a₁
b : Solution₁ d
hb₂ :
  ∀ (y : Solution₁ d), (fun a₁ => 1 < a₁.x ∧ 0 < a₁.y ∧ ∀ (a : Solution₁ d), ∃ n, a = a₁ ^ n ∨ a = -a₁ ^ n) y → y = b
⊢ IsFundamental a

tactic: rwa [hb₂ a h, ← hb₂ a₁ ⟨ha₁.1, ha₁.2.1, ha₁.eq_zpow_or_neg_zpow⟩]
state_before: case intro.intro.intro
d : ℤ
a : Solution₁ d
h : 1 < a.x ∧ 0 < a.y ∧ ∀ (b : Solution₁ d), ∃ n, b = a ^ n ∨ b = -a ^ n
h₀ : 0 < d
hd : ¬IsSquare d
a₁ : Solution₁ d
ha₁ : IsFundamental a₁
b : Solution₁ d
hb₂ :
  ∀ (y : Solution₁ d), (fun a₁ => 1 < a₁.x ∧ 0 < a₁.y ∧ ∀ (a : Solution₁ d), ∃ n, a = a₁ ^ n ∨ a = -a₁ ^ n) y → y = b
⊢ IsFundamental a
state_after: no goals