tasksource/leandojo huggingface dataset:
Theorem: LocalEquiv.IsImage.leftInvOn_piecewise
File: Mathlib/Logic/Equiv/LocalEquiv.lean

tactic: rintro x (⟨he, hs⟩ | ⟨he, hs : x ∉ s⟩)
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.29796
δ : Type ?u.29799
e : LocalEquiv α β
e'✝ : LocalEquiv β γ
s : Set α
t : Set β
x : α
y : β
e' : LocalEquiv α β
inst✝¹ : (i : α) → Decidable (i ∈ s)
inst✝ : (i : β) → Decidable (i ∈ t)
h : IsImage e s t
h' : IsImage e' s t
⊢ LeftInvOn (piecewise t ↑(LocalEquiv.symm e) ↑(LocalEquiv.symm e')) (piecewise s ↑e ↑e') (Set.ite s e.source e'.source)

tactic: rw [piecewise_eq_of_mem _ _ _ hs, piecewise_eq_of_mem _ _ _ ((h he).2 hs), e.left_inv he]
state_before: case inl.intro
α : Type u_1
β : Type u_2
γ : Type ?u.29796
δ : Type ?u.29799
e : LocalEquiv α β
e'✝ : LocalEquiv β γ
s : Set α
t : Set β
x✝ : α
y : β
e' : LocalEquiv α β
inst✝¹ : (i : α) → Decidable (i ∈ s)
inst✝ : (i : β) → Decidable (i ∈ t)
h : IsImage e s t
h' : IsImage e' s t
x : α
he : x ∈ e.source
hs : x ∈ s
⊢ piecewise t (↑(LocalEquiv.symm e)) (↑(LocalEquiv.symm e')) (piecewise s (↑e) (↑e') x) = x

tactic: rw [piecewise_eq_of_not_mem _ _ _ hs, piecewise_eq_of_not_mem _ _ _ ((h'.compl he).2 hs),
  e'.left_inv he]
state_before: case inr.intro
α : Type u_1
β : Type u_2
γ : Type ?u.29796
δ : Type ?u.29799
e : LocalEquiv α β
e'✝ : LocalEquiv β γ
s : Set α
t : Set β
x✝ : α
y : β
e' : LocalEquiv α β
inst✝¹ : (i : α) → Decidable (i ∈ s)
inst✝ : (i : β) → Decidable (i ∈ t)
h : IsImage e s t
h' : IsImage e' s t
x : α
he : x ∈ e'.source
hs : ¬x ∈ s
⊢ piecewise t (↑(LocalEquiv.symm e)) (↑(LocalEquiv.symm e')) (piecewise s (↑e) (↑e') x) = x
Theorem: List.Func.get_map'
File: Mathlib/Data/List/Func.lean

tactic: intro h1
state_before: α : Type u
β : Type v
γ : Type w
a : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
f : α → β
n : ℕ
as : List α
⊢ f default = default → get n (map f as) = f (get n as)

tactic: by_cases h2 : n < as.length
state_before: α : Type u
β : Type v
γ : Type w
a : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
f : α → β
n : ℕ
as : List α
h1 : f default = default
⊢ get n (map f as) = f (get n as)

tactic: apply get_map h2
state_before: case pos
α : Type u
β : Type v
γ : Type w
a : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
f : α → β
n : ℕ
as : List α
h1 : f default = default
h2 : n < length as
⊢ get n (map f as) = f (get n as)

tactic: rw [not_lt] at h2
state_before: case neg
α : Type u
β : Type v
γ : Type w
a : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
f : α → β
n : ℕ
as : List α
h1 : f default = default
h2 : ¬n < length as
⊢ get n (map f as) = f (get n as)

tactic: rw [get_eq_default_of_le _ h2, get_eq_default_of_le, h1]
state_before: case neg
α : Type u
β : Type v
γ : Type w
a : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
f : α → β
n : ℕ
as : List α
h1 : f default = default
h2 : length as ≤ n
⊢ get n (map f as) = f (get n as)

tactic: rw [length_map]
state_before: case neg.a
α : Type u
β : Type v
γ : Type w
a : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
f : α → β
n : ℕ
as : List α
h1 : f default = default
h2 : length as ≤ n
⊢ length (map f as) ≤ n

tactic: apply h2
state_before: case neg.a
α : Type u
β : Type v
γ : Type w
a : α
as✝ as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
f : α → β
n : ℕ
as : List α
h1 : f default = default
h2 : length as ≤ n
⊢ length as ≤ n
Theorem: Profinite.mono_iff_injective
File: Mathlib/Topology/Category/Profinite/Basic.lean

tactic: constructor
state_before: X✝ Y✝ : Profinite
f✝ : X✝ ⟶ Y✝
X Y : Profinite
f : X ⟶ Y
⊢ Mono f ↔ Function.Injective ((forget Profinite).map f)

tactic: intro h
state_before: case mp
X✝ Y✝ : Profinite
f✝ : X✝ ⟶ Y✝
X Y : Profinite
f : X ⟶ Y
⊢ Mono f → Function.Injective ((forget Profinite).map f)

tactic: haveI : Limits.PreservesLimits profiniteToCompHaus := inferInstance
state_before: case mp
X✝ Y✝ : Profinite
f✝ : X✝ ⟶ Y✝
X Y : Profinite
f : X ⟶ Y
h : Mono f
⊢ Function.Injective ((forget Profinite).map f)

tactic: haveI : Mono (profiniteToCompHaus.map f) := inferInstance
state_before: case mp
X✝ Y✝ : Profinite
f✝ : X✝ ⟶ Y✝
X Y : Profinite
f : X ⟶ Y
h : Mono f
this : Limits.PreservesLimits profiniteToCompHaus
⊢ Function.Injective ((forget Profinite).map f)

tactic: erw [← CompHaus.mono_iff_injective]
state_before: case mp
X✝ Y✝ : Profinite
f✝ : X✝ ⟶ Y✝
X Y : Profinite
f : X ⟶ Y
h : Mono f
this✝ : Limits.PreservesLimits profiniteToCompHaus
this : Mono (profiniteToCompHaus.map f)
⊢ Function.Injective ((forget Profinite).map f)

tactic: assumption
state_before: case mp
X✝ Y✝ : Profinite
f✝ : X✝ ⟶ Y✝
X Y : Profinite
f : X ⟶ Y
h : Mono f
this✝ : Limits.PreservesLimits profiniteToCompHaus
this : Mono (profiniteToCompHaus.map f)
⊢ Mono ((inducedFunctor toCompHaus).map f)

tactic: rw [← CategoryTheory.mono_iff_injective]
state_before: case mpr
X✝ Y✝ : Profinite
f✝ : X✝ ⟶ Y✝
X Y : Profinite
f : X ⟶ Y
⊢ Function.Injective ((forget Profinite).map f) → Mono f

tactic: apply (forget Profinite).mono_of_mono_map
state_before: case mpr
X✝ Y✝ : Profinite
f✝ : X✝ ⟶ Y✝
X Y : Profinite
f : X ⟶ Y
⊢ Mono ((forget Profinite).map f) → Mono f
Theorem: InnerProductGeometry.angle_neg_neg
File: Mathlib/Geometry/Euclidean/Angle/Unoriented/Basic.lean

tactic: unfold angle
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x✝ y✝ x y : V
⊢ angle (-x) (-y) = angle x y

tactic: rw [inner_neg_neg, norm_neg, norm_neg]
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x✝ y✝ x y : V
⊢ arccos (inner (-x) (-y) / (‖-x‖ * ‖-y‖)) = arccos (inner x y / (‖x‖ * ‖y‖))
Theorem: ContDiffOn.differentiableOn_iteratedDerivWithin
File: Mathlib/Analysis/Calculus/IteratedDeriv.lean

tactic: rwa [insert_eq_of_mem hx]
state_before: 𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
F : Type u_2
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
E : Type ?u.58253
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
n✝ : ℕ
f : 𝕜 → F
s : Set 𝕜
x✝ : 𝕜
n : ℕ∞
m : ℕ
h : ContDiffOn 𝕜 n f s
hmn : ↑m < n
hs : UniqueDiffOn 𝕜 s
x : 𝕜
hx : x ∈ s
⊢ UniqueDiffOn 𝕜 (insert x s)
Theorem: Multiset.sub_inter
File: Mathlib/Data/Multiset/Basic.lean

tactic: rw [sub_add_inter s t, tsub_add_cancel_of_le (inter_le_left s t)]
state_before: α : Type u_1
β : Type ?u.195832
γ : Type ?u.195835
inst✝ : DecidableEq α
s✝ t✝ u : Multiset α
a b : α
s t : Multiset α
⊢ s - s ∩ t + ?m.196298 s t = s - t + ?m.196298 s t
Theorem: SimpleGraph.IsClique.subset
File: Mathlib/Combinatorics/SimpleGraph/Clique.lean

tactic: simp_rw [isClique_iff]
state_before: α : Type u_1
G H : SimpleGraph α
s t : Set α
h : t ⊆ s
⊢ IsClique G s → IsClique G t

tactic: exact Set.Pairwise.mono h
state_before: α : Type u_1
G H : SimpleGraph α
s t : Set α
h : t ⊆ s
⊢ Set.Pairwise s G.Adj → Set.Pairwise t G.Adj
Theorem: Equiv.Perm.extendDomain_refl
File: Mathlib/Logic/Equiv/Basic.lean

tactic: simp [Perm.extendDomain]
state_before: α' : Type u_2
β' : Type u_1
e : Perm α'
p : β' → Prop
inst✝ : DecidablePred p
f : α' ≃ Subtype p
⊢ extendDomain (Equiv.refl α') f = Equiv.refl β'
Theorem: IntermediateField.isSplittingField_iff
File: Mathlib/FieldTheory/Adjoin.lean

tactic: suffices _ → (Algebra.adjoin F (p.rootSet K) = ⊤ ↔ K = adjoin F (p.rootSet E)) by
  exact ⟨fun h => ⟨h.1, (this h.1).mp h.2⟩, fun h => ⟨h.1, (this h.1).mpr h.2⟩⟩
state_before: F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
α : E
p : F[X]
K : IntermediateField F E
⊢ IsSplittingField F { x // x ∈ K } p ↔ Splits (algebraMap F { x // x ∈ K }) p ∧ K = adjoin F (rootSet p E)

tactic: simp_rw [SetLike.ext_iff, ← mem_toSubalgebra, ← SetLike.ext_iff]
state_before: F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
α : E
p : F[X]
K : IntermediateField F E
⊢ Splits (algebraMap F { x // x ∈ K }) p →
    (Algebra.adjoin F (rootSet p { x // x ∈ K }) = ⊤ ↔ K = adjoin F (rootSet p E))

tactic: rw [adjoin_algebraic_toSubalgebra fun x => isAlgebraic_of_mem_rootSet]
state_before: F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
α : E
p : F[X]
K : IntermediateField F E
⊢ Splits (algebraMap F { x // x ∈ K }) p →
    (Algebra.adjoin F (rootSet p { x // x ∈ K }) = ⊤ ↔ K.toSubalgebra = (adjoin F (rootSet p E)).toSubalgebra)

tactic: refine' fun hp => (adjoin_rootSet_eq_range hp K.val).symm.trans _
state_before: F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
α : E
p : F[X]
K : IntermediateField F E
⊢ Splits (algebraMap F { x // x ∈ K }) p →
    (Algebra.adjoin F (rootSet p { x // x ∈ K }) = ⊤ ↔ K.toSubalgebra = Algebra.adjoin F (rootSet p E))

tactic: rw [← K.range_val, eq_comm]
state_before: F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
α : E
p : F[X]
K : IntermediateField F E
hp : Splits (algebraMap F { x // x ∈ K }) p
⊢ Algebra.adjoin F (rootSet p E) = AlgHom.range (val K) ↔ K.toSubalgebra = Algebra.adjoin F (rootSet p E)

tactic: exact ⟨fun h => ⟨h.1, (this h.1).mp h.2⟩, fun h => ⟨h.1, (this h.1).mpr h.2⟩⟩
state_before: F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
α : E
p : F[X]
K : IntermediateField F E
this : ?m.627638 → (Algebra.adjoin F (rootSet p { x // x ∈ K }) = ⊤ ↔ K = adjoin F (rootSet p E))
⊢ IsSplittingField F { x // x ∈ K } p ↔ Splits (algebraMap F { x // x ∈ K }) p ∧ K = adjoin F (rootSet p E)
Theorem: midpoint_sub_add
File: Mathlib/LinearAlgebra/AffineSpace/Midpoint.lean

tactic: rw [sub_eq_add_neg, ← vadd_eq_add, ← vadd_eq_add, ← midpoint_vadd_midpoint]
state_before: R : Type u_2
V : Type u_1
V' : Type ?u.138949
P : Type ?u.138952
P' : Type ?u.138955
inst✝⁷ : Ring R
inst✝⁶ : Invertible 2
inst✝⁵ : AddCommGroup V
inst✝⁴ : Module R V
inst✝³ : AddTorsor V P
inst✝² : AddCommGroup V'
inst✝¹ : Module R V'
inst✝ : AddTorsor V' P'
x✝ y✝ z : P
x y : V
⊢ midpoint R (x - y) (x + y) = x

tactic: simp
state_before: R : Type u_2
V : Type u_1
V' : Type ?u.138949
P : Type ?u.138952
P' : Type ?u.138955
inst✝⁷ : Ring R
inst✝⁶ : Invertible 2
inst✝⁵ : AddCommGroup V
inst✝⁴ : Module R V
inst✝³ : AddTorsor V P
inst✝² : AddCommGroup V'
inst✝¹ : Module R V'
inst✝ : AddTorsor V' P'
x✝ y✝ z : P
x y : V
⊢ midpoint R x x +ᵥ midpoint R (-y) y = x
Theorem: PNat.gcd_eq_left
File: Mathlib/Data/PNat/Prime.lean

tactic: rw [dvd_iff]
state_before: m n : ℕ+
⊢ m ∣ n → gcd m n = m

tactic: intro h
state_before: m n : ℕ+
⊢ ↑m ∣ ↑n → gcd m n = m

tactic: apply eq
state_before: m n : ℕ+
h : ↑m ∣ ↑n
⊢ gcd m n = m

tactic: simp only [gcd_coe]
state_before: case a
m n : ℕ+
h : ↑m ∣ ↑n
⊢ ↑(gcd m n) = ↑m

tactic: apply Nat.gcd_eq_left h
state_before: case a
m n : ℕ+
h : ↑m ∣ ↑n
⊢ Nat.gcd ↑m ↑n = ↑m
Theorem: MonoidAlgebra.mul_apply_right
File: Mathlib/Algebra/MonoidAlgebra/Basic.lean

tactic: rw [← Finsupp.sum_apply, ← Finsupp.mul_sum f g, g.sum_single]
state_before: k : Type u₁
G : Type u₂
R : Type ?u.1518387
inst✝¹ : Semiring k
inst✝ : Group G
f g : MonoidAlgebra k G
x : G
⊢ ↑(f * g) x = sum g fun a b => ↑(f * single a b) x

tactic: simp only [mul_single_apply, Finsupp.sum]
state_before: k : Type u₁
G : Type u₂
R : Type ?u.1518387
inst✝¹ : Semiring k
inst✝ : Group G
f g : MonoidAlgebra k G
x : G
⊢ (sum g fun a b => ↑(f * single a b) x) = sum g fun a b => ↑f (x * a⁻¹) * b
Theorem: Matrix.zpow_neg
File: Mathlib/LinearAlgebra/Matrix/ZPow.lean

tactic: rw [zpow_negSucc, neg_negSucc, zpow_ofNat, nonsing_inv_nonsing_inv]
state_before: n' : Type u_1
inst✝² : DecidableEq n'
inst✝¹ : Fintype n'
R : Type u_2
inst✝ : CommRing R
A : M
h : IsUnit (det A)
n : ℕ
⊢ A ^ (- -[n+1]) = (A ^ -[n+1])⁻¹

tactic: rw [det_pow]
state_before: case h
n' : Type u_1
inst✝² : DecidableEq n'
inst✝¹ : Fintype n'
R : Type u_2
inst✝ : CommRing R
A : M
h : IsUnit (det A)
n : ℕ
⊢ IsUnit (det (A ^ (n + 1)))

tactic: exact h.pow _
state_before: case h
n' : Type u_1
inst✝² : DecidableEq n'
inst✝¹ : Fintype n'
R : Type u_2
inst✝ : CommRing R
A : M
h : IsUnit (det A)
n : ℕ
⊢ IsUnit (det A ^ (n + 1))
Theorem: Inducing.continuousWithinAt_iff
File: Mathlib/Topology/ContinuousOn.lean

tactic: simp_rw [ContinuousWithinAt, Inducing.tendsto_nhds_iff hg]
state_before: α : Type u_3
β : Type u_1
γ : Type u_2
δ : Type ?u.350125
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : TopologicalSpace δ
f : α → β
g : β → γ
hg : Inducing g
s : Set α
x : α
⊢ ContinuousWithinAt f s x ↔ ContinuousWithinAt (g ∘ f) s x

tactic: rfl
state_before: α : Type u_3
β : Type u_1
γ : Type u_2
δ : Type ?u.350125
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : TopologicalSpace δ
f : α → β
g : β → γ
hg : Inducing g
s : Set α
x : α
⊢ Tendsto (g ∘ f) (𝓝[s] x) (𝓝 (g (f x))) ↔ Tendsto (g ∘ f) (𝓝[s] x) (𝓝 ((g ∘ f) x))
Theorem: Dfinsupp.filter_single_pos
File: Mathlib/Data/Dfinsupp/Basic.lean

tactic: rw [filter_single, if_pos h]
state_before: ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
dec : DecidableEq ι
inst✝¹ : (i : ι) → Zero (β i)
s : Finset ι
x✝ : (i : ↑↑s) → β ↑i
i✝ : ι
p : ι → Prop
inst✝ : DecidablePred p
i : ι
x : β i
h : p i
⊢ filter p (single i x) = single i x
Theorem: Rat.neg_divInt
File: Std/Data/Rat/Lemmas.lean

tactic: rcases Int.eq_nat_or_neg d with ⟨_, rfl | rfl⟩ <;> simp [divInt_neg', neg_mkRat]
state_before: n d : Int
⊢ -(n /. d) = -n /. d
Theorem: Polynomial.derivWithin
File: Mathlib/Analysis/Calculus/Deriv/Polynomial.lean

tactic: rw [DifferentiableAt.derivWithin p.differentiableAt hxs]
state_before: 𝕜 : Type u
inst✝⁶ : NontriviallyNormedField 𝕜
F : Type v
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
E : Type w
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
f f₀ f₁ g : 𝕜 → F
f' f₀' f₁' g' : F
x : 𝕜
s t : Set 𝕜
L L₁ L₂ : Filter 𝕜
R : Type ?u.85451
inst✝¹ : CommSemiring R
inst✝ : Algebra R 𝕜
p : 𝕜[X]
q : R[X]
hxs : UniqueDiffWithinAt 𝕜 s x
⊢ derivWithin (fun x => eval x p) s x = eval x (↑derivative p)

tactic: exact p.deriv
state_before: 𝕜 : Type u
inst✝⁶ : NontriviallyNormedField 𝕜
F : Type v
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
E : Type w
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
f f₀ f₁ g : 𝕜 → F
f' f₀' f₁' g' : F
x : 𝕜
s t : Set 𝕜
L L₁ L₂ : Filter 𝕜
R : Type ?u.85451
inst✝¹ : CommSemiring R
inst✝ : Algebra R 𝕜
p : 𝕜[X]
q : R[X]
hxs : UniqueDiffWithinAt 𝕜 s x
⊢ deriv (fun x => eval x p) x = eval x (↑derivative p)
Theorem: Nat.div_div_div_eq_div
File: Mathlib/Data/Nat/Order/Lemmas.lean

tactic: simp
state_before: a✝ b✝ m n k a b c x✝¹ x✝ : ℕ
dvd : x✝¹ ∣ 0
dvd2 : 0 ∣ x✝
⊢ x✝ / (0 / x✝¹) / x✝¹ = x✝ / 0

tactic: simp at dvd
state_before: a✝¹ b✝ m n k a✝ b c a x✝ : ℕ
dvd : 0 ∣ a + 1
dvd2 : a + 1 ∣ x✝
⊢ x✝ / ((a + 1) / 0) / 0 = x✝ / (a + 1)

tactic: have a_split : a + 1 ≠ 0 := succ_ne_zero a
state_before: a✝¹ b✝ m n k a✝ b c✝ a c x✝ : ℕ
dvd : c + 1 ∣ a + 1
dvd2 : a + 1 ∣ x✝
⊢ x✝ / ((a + 1) / (c + 1)) / (c + 1) = x✝ / (a + 1)

tactic: have c_split : c + 1 ≠ 0 := succ_ne_zero c
state_before: a✝¹ b✝ m n k a✝ b c✝ a c x✝ : ℕ
dvd : c + 1 ∣ a + 1
dvd2 : a + 1 ∣ x✝
a_split : a + 1 ≠ 0
⊢ x✝ / ((a + 1) / (c + 1)) / (c + 1) = x✝ / (a + 1)

tactic: rcases dvd2 with ⟨k, rfl⟩
state_before: a✝¹ b✝ m n k a✝ b c✝ a c x✝ : ℕ
dvd : c + 1 ∣ a + 1
dvd2 : a + 1 ∣ x✝
a_split : a + 1 ≠ 0
c_split : c + 1 ≠ 0
⊢ x✝ / ((a + 1) / (c + 1)) / (c + 1) = x✝ / (a + 1)

tactic: rcases dvd with ⟨k2, pr⟩
state_before: case intro
a✝¹ b✝ m n k✝ a✝ b c✝ a c : ℕ
dvd : c + 1 ∣ a + 1
a_split : a + 1 ≠ 0
c_split : c + 1 ≠ 0
k : ℕ
⊢ (a + 1) * k / ((a + 1) / (c + 1)) / (c + 1) = (a + 1) * k / (a + 1)

tactic: have k2_nonzero : k2 ≠ 0 := fun k2_zero => by simp [k2_zero] at pr
state_before: case intro.intro
a✝¹ b✝ m n k✝ a✝ b c✝ a c : ℕ
a_split : a + 1 ≠ 0
c_split : c + 1 ≠ 0
k k2 : ℕ
pr : a + 1 = (c + 1) * k2
⊢ (a + 1) * k / ((a + 1) / (c + 1)) / (c + 1) = (a + 1) * k / (a + 1)

tactic: rw [Nat.mul_div_cancel_left k (Nat.pos_of_ne_zero a_split), pr,
  Nat.mul_div_cancel_left k2 (Nat.pos_of_ne_zero c_split), Nat.mul_comm ((c + 1) * k2) k, ←
  Nat.mul_assoc k (c + 1) k2, Nat.mul_div_cancel _ (Nat.pos_of_ne_zero k2_nonzero),
  Nat.mul_div_cancel _ (Nat.pos_of_ne_zero c_split)]
state_before: case intro.intro
a✝¹ b✝ m n k✝ a✝ b c✝ a c : ℕ
a_split : a + 1 ≠ 0
c_split : c + 1 ≠ 0
k k2 : ℕ
pr : a + 1 = (c + 1) * k2
k2_nonzero : k2 ≠ 0
⊢ (a + 1) * k / ((a + 1) / (c + 1)) / (c + 1) = (a + 1) * k / (a + 1)

tactic: simp [k2_zero] at pr
state_before: a✝¹ b✝ m n k✝ a✝ b c✝ a c : ℕ
a_split : a + 1 ≠ 0
c_split : c + 1 ≠ 0
k k2 : ℕ
pr : a + 1 = (c + 1) * k2
k2_zero : k2 = 0
⊢ False
Theorem: Finsupp.support_eq_empty
File: Mathlib/Data/Finsupp/Defs.lean

tactic: exact_mod_cast @Function.support_eq_empty_iff _ _ _ f
state_before: α : Type u_1
β : Type ?u.15456
γ : Type ?u.15459
ι : Type ?u.15462
M : Type u_2
M' : Type ?u.15468
N : Type ?u.15471
P : Type ?u.15474
G : Type ?u.15477
H : Type ?u.15480
R : Type ?u.15483
S : Type ?u.15486
inst✝ : Zero M
f : α →₀ M
⊢ f.support = ∅ ↔ f = 0
Theorem: ProbabilityTheory.inter_pos_of_cond_ne_zero
File: Mathlib/Probability/ConditionalProbability.lean

tactic: refine' pos_iff_ne_zero.mpr (right_ne_zero_of_mul _)
state_before: Ω : Type u_1
m : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
s t : Set Ω
hms : MeasurableSet s
hcst : ↑↑(μ[|s]) t ≠ 0
⊢ 0 < ↑↑μ (s ∩ t)

tactic: convert hcst
state_before: case refine'_2
Ω : Type u_1
m : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
s t : Set Ω
hms : MeasurableSet s
hcst : ↑↑(μ[|s]) t ≠ 0
⊢ (↑↑μ s)⁻¹ * ↑↑μ (s ∩ t) ≠ 0

tactic: simp [hms, Set.inter_comm, cond]
state_before: case h.e'_2
Ω : Type u_1
m : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
s t : Set Ω
hms : MeasurableSet s
hcst : ↑↑(μ[|s]) t ≠ 0
⊢ (↑↑μ s)⁻¹ * ↑↑μ (s ∩ t) = ↑↑(μ[|s]) t

tactic: exact (μ s)⁻¹
state_before: case refine'_1
Ω : Type u_1
m : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
s t : Set Ω
hms : MeasurableSet s
hcst : ↑↑(μ[|s]) t ≠ 0
⊢ ℝ≥0∞
Theorem: LaurentPolynomial.leftInverse_trunc_toLaurent
File: Mathlib/Data/Polynomial/Laurent.lean

tactic: refine' fun f => f.induction_on' _ _
state_before: R : Type u_1
inst✝ : Semiring R
⊢ Function.LeftInverse ↑trunc ↑toLaurent

tactic: intro f g hf hg
state_before: case refine'_1
R : Type u_1
inst✝ : Semiring R
f : R[X]
⊢ ∀ (p q : R[X]), ↑trunc (↑toLaurent p) = p → ↑trunc (↑toLaurent q) = q → ↑trunc (↑toLaurent (p + q)) = p + q

tactic: simp only [hf, hg, _root_.map_add]
state_before: case refine'_1
R : Type u_1
inst✝ : Semiring R
f✝ f g : R[X]
hf : ↑trunc (↑toLaurent f) = f
hg : ↑trunc (↑toLaurent g) = g
⊢ ↑trunc (↑toLaurent (f + g)) = f + g

tactic: intro n r
state_before: case refine'_2
R : Type u_1
inst✝ : Semiring R
f : R[X]
⊢ ∀ (n : ℕ) (a : R), ↑trunc (↑toLaurent (↑(monomial n) a)) = ↑(monomial n) a

tactic: simp only [Polynomial.toLaurent_C_mul_T, trunc_C_mul_T, Int.coe_nat_nonneg, Int.toNat_coe_nat,
  if_true]
state_before: case refine'_2
R : Type u_1
inst✝ : Semiring R
f : R[X]
n : ℕ
r : R
⊢ ↑trunc (↑toLaurent (↑(monomial n) r)) = ↑(monomial n) r
Theorem: Fin.update_snoc_last
File: Mathlib/Data/Fin/Tuple/Basic.lean

tactic: ext j
state_before: m n : ℕ
α : Fin (n + 1) → Type u
x : α (last n)
q : (i : Fin (n + 1)) → α i
p : (i : Fin n) → α (↑castSucc i)
i : Fin n
y : α (↑castSucc i)
z : α (last n)
⊢ update (snoc p x) (last n) z = snoc p z

tactic: by_cases h : j.val < n
state_before: case h
m n : ℕ
α : Fin (n + 1) → Type u
x : α (last n)
q : (i : Fin (n + 1)) → α i
p : (i : Fin n) → α (↑castSucc i)
i : Fin n
y : α (↑castSucc i)
z : α (last n)
j : Fin (n + 1)
⊢ update (snoc p x) (last n) z j = snoc p z j

tactic: have : j ≠ last n := ne_of_lt h
state_before: case pos
m n : ℕ
α : Fin (n + 1) → Type u
x : α (last n)
q : (i : Fin (n + 1)) → α i
p : (i : Fin n) → α (↑castSucc i)
i : Fin n
y : α (↑castSucc i)
z : α (last n)
j : Fin (n + 1)
h : ↑j < n
⊢ update (snoc p x) (last n) z j = snoc p z j

tactic: simp [h, update_noteq, this, snoc]
state_before: case pos
m n : ℕ
α : Fin (n + 1) → Type u
x : α (last n)
q : (i : Fin (n + 1)) → α i
p : (i : Fin n) → α (↑castSucc i)
i : Fin n
y : α (↑castSucc i)
z : α (last n)
j : Fin (n + 1)
h : ↑j < n
this : j ≠ last n
⊢ update (snoc p x) (last n) z j = snoc p z j

tactic: rw [eq_last_of_not_lt h]
state_before: case neg
m n : ℕ
α : Fin (n + 1) → Type u
x : α (last n)
q : (i : Fin (n + 1)) → α i
p : (i : Fin n) → α (↑castSucc i)
i : Fin n
y : α (↑castSucc i)
z : α (last n)
j : Fin (n + 1)
h : ¬↑j < n
⊢ update (snoc p x) (last n) z j = snoc p z j

tactic: simp
state_before: case neg
m n : ℕ
α : Fin (n + 1) → Type u
x : α (last n)
q : (i : Fin (n + 1)) → α i
p : (i : Fin n) → α (↑castSucc i)
i : Fin n
y : α (↑castSucc i)
z : α (last n)
j : Fin (n + 1)
h : ¬↑j < n
⊢ update (snoc p x) (last n) z (last n) = snoc p z (last n)
Theorem: LinearMap.isOrtho_flip
File: Mathlib/LinearAlgebra/SesquilinearForm.lean

tactic: simp_rw [isOrtho_def, flip_apply]
state_before: R : Type u_2
R₁ : Type u_1
R₂ : Type ?u.19748
R₃ : Type ?u.19751
M : Type ?u.19754
M₁ : Type u_3
M₂ : Type ?u.19760
Mₗ₁ : Type ?u.19763
Mₗ₁' : Type ?u.19766
Mₗ₂ : Type ?u.19769
Mₗ₂' : Type ?u.19772
K : Type ?u.19775
K₁ : Type ?u.19778
K₂ : Type ?u.19781
V : Type ?u.19784
V₁ : Type ?u.19787
V₂ : Type ?u.19790
n : Type ?u.19793
inst✝⁶ : CommSemiring R
inst✝⁵ : CommSemiring R₁
inst✝⁴ : AddCommMonoid M₁
inst✝³ : Module R₁ M₁
inst✝² : CommSemiring R₂
inst✝¹ : AddCommMonoid M₂
inst✝ : Module R₂ M₂
I₁ : R₁ →+* R
I₂ : R₂ →+* R
I₁' : R₁ →+* R
B : M₁ →ₛₗ[I₁] M₁ →ₛₗ[I₁'] R
x y : M₁
⊢ IsOrtho B x y ↔ IsOrtho (flip B) y x
Theorem: Complex.lim_conj
File: Mathlib/Data/Complex/Basic.lean

tactic: simp [cauSeqConj, (lim_re _).symm, cauSeqRe]
state_before: f : CauSeq ℂ ↑abs
⊢ (CauSeq.lim (cauSeqConj f)).re = (↑(starRingEnd ℂ) (CauSeq.lim f)).re

tactic: simp [cauSeqConj, (lim_im _).symm, cauSeqIm, (lim_neg _).symm]
state_before: f : CauSeq ℂ ↑abs
⊢ (CauSeq.lim (cauSeqConj f)).im = (↑(starRingEnd ℂ) (CauSeq.lim f)).im

tactic: rfl
state_before: f : CauSeq ℂ ↑abs
⊢ CauSeq.lim { val := fun n => -(↑f n).im, property := (_ : (fun f => IsCauSeq abs' f) fun n => -(↑f n).im) } =
    CauSeq.lim (-{ val := fun n => (↑f n).im, property := (_ : IsCauSeq abs' fun n => (↑f n).im) })
Theorem: Finset.disjoint_union_left
File: Mathlib/Data/Finset/Basic.lean

tactic: simp only [disjoint_left, mem_union, or_imp, forall_and]
state_before: α : Type u_1
β : Type ?u.153416
γ : Type ?u.153419
inst✝ : DecidableEq α
s s₁ s₂ t t₁ t₂ u v : Finset α
a b : α
⊢ _root_.Disjoint (s ∪ t) u ↔ _root_.Disjoint s u ∧ _root_.Disjoint t u
Theorem: CategoryTheory.Presieve.ofArrows_pUnit
File: Mathlib/CategoryTheory/Sites/Sieves.lean

tactic: funext Y
state_before: C : Type u₁
inst✝¹ : Category C
D : Type u₂
inst✝ : Category D
F : C ⥤ D
X Y Z : C
f : Y ⟶ X
⊢ (ofArrows (fun x => Y) fun x => f) = singleton f

tactic: ext g
state_before: case h
C : Type u₁
inst✝¹ : Category C
D : Type u₂
inst✝ : Category D
F : C ⥤ D
X Y✝ Z : C
f : Y✝ ⟶ X
Y : C
⊢ (ofArrows (fun x => Y✝) fun x => f) = singleton f

tactic: constructor
state_before: case h.h
C : Type u₁
inst✝¹ : Category C
D : Type u₂
inst✝ : Category D
F : C ⥤ D
X Y✝ Z : C
f : Y✝ ⟶ X
Y : C
g : Y ⟶ X
⊢ (g ∈ ofArrows (fun x => Y✝) fun x => f) ↔ g ∈ singleton f

tactic: rintro ⟨_⟩
state_before: case h.h.mp
C : Type u₁
inst✝¹ : Category C
D : Type u₂
inst✝ : Category D
F : C ⥤ D
X Y✝ Z : C
f : Y✝ ⟶ X
Y : C
g : Y ⟶ X
⊢ (g ∈ ofArrows (fun x => Y✝) fun x => f) → g ∈ singleton f

tactic: apply singleton.mk
state_before: case h.h.mp.mk
C : Type u₁
inst✝¹ : Category C
D : Type u₂
inst✝ : Category D
F : C ⥤ D
X Y✝ Z : C
f : Y✝ ⟶ X
Y : C
i✝ : PUnit
⊢ f ∈ singleton f

tactic: rintro ⟨_⟩
state_before: case h.h.mpr
C : Type u₁
inst✝¹ : Category C
D : Type u₂
inst✝ : Category D
F : C ⥤ D
X Y✝ Z : C
f : Y✝ ⟶ X
Y : C
g : Y ⟶ X
⊢ g ∈ singleton f → g ∈ ofArrows (fun x => Y✝) fun x => f

tactic: exact ofArrows.mk PUnit.unit
state_before: case h.h.mpr.mk
C : Type u₁
inst✝¹ : Category C
D : Type u₂
inst✝ : Category D
F : C ⥤ D
X Y✝ Z : C
f : Y✝ ⟶ X
Y : C
⊢ f ∈ ofArrows (fun x => Y✝) fun x => f
Theorem: Nat.mem_range_succ
File: Mathlib/Data/Set/Image.lean

tactic: rintro ⟨n, rfl⟩
state_before: α : Type ?u.70793
β : Type ?u.70796
γ : Type ?u.70799
ι : Sort ?u.70802
ι' : Sort ?u.70805
f : ι → α
s t : Set α
i : ℕ
⊢ i ∈ range Nat.succ → 0 < i

tactic: exact Nat.succ_pos n
state_before: case intro
α : Type ?u.70793
β : Type ?u.70796
γ : Type ?u.70799
ι : Sort ?u.70802
ι' : Sort ?u.70805
f : ι → α
s t : Set α
n : ℕ
⊢ 0 < Nat.succ n