tasksource/leandojo huggingface dataset:
Theorem: Computability.decode_encodePosNum
File: Mathlib/Computability/Encoding.lean

tactic: intro n
state_before: ⊢ ∀ (n : PosNum), decodePosNum (encodePosNum n) = n

tactic: induction' n with m hm m hm <;> unfold encodePosNum decodePosNum
state_before: n : PosNum
⊢ decodePosNum (encodePosNum n) = n

tactic: rfl
state_before: case one

⊢ (if [] = [] then PosNum.one else PosNum.bit1 (decodePosNum [])) = PosNum.one

tactic: rw [hm]
state_before: case bit1
m : PosNum
hm : decodePosNum (encodePosNum m) = m
⊢ (if encodePosNum m = [] then PosNum.one else PosNum.bit1 (decodePosNum (encodePosNum m))) = PosNum.bit1 m

tactic: exact if_neg (encodePosNum_nonempty m)
state_before: case bit1
m : PosNum
hm : decodePosNum (encodePosNum m) = m
⊢ (if encodePosNum m = [] then PosNum.one else PosNum.bit1 m) = PosNum.bit1 m

tactic: exact congr_arg PosNum.bit0 hm
state_before: case bit0
m : PosNum
hm : decodePosNum (encodePosNum m) = m
⊢ PosNum.bit0 (decodePosNum (encodePosNum m)) = PosNum.bit0 m
Theorem: MonotoneOn.integral_le_sum
File: Mathlib/Analysis/SumIntegralComparisons.lean

tactic: rw [← neg_le_neg_iff, ← Finset.sum_neg_distrib, ← intervalIntegral.integral_neg]
state_before: x₀ : ℝ
a b : ℕ
f : ℝ → ℝ
hf : MonotoneOn f (Icc x₀ (x₀ + ↑a))
⊢ (∫ (x : ℝ) in x₀..x₀ + ↑a, f x) ≤ ∑ i in Finset.range a, f (x₀ + ↑(i + 1))

tactic: exact hf.neg.sum_le_integral
state_before: x₀ : ℝ
a b : ℕ
f : ℝ → ℝ
hf : MonotoneOn f (Icc x₀ (x₀ + ↑a))
⊢ ∑ x in Finset.range a, -f (x₀ + ↑(x + 1)) ≤ ∫ (x : ℝ) in x₀..x₀ + ↑a, -f x
Theorem: Padic.AddValuation.map_mul
File: Mathlib/NumberTheory/Padics/PadicNumbers.lean

tactic: simp only [addValuationDef]
state_before: p : ℕ
hp : Fact (Nat.Prime p)
x y : ℚ_[p]
⊢ addValuationDef (x * y) = addValuationDef x + addValuationDef y

tactic: by_cases hx : x = 0
state_before: p : ℕ
hp : Fact (Nat.Prime p)
x y : ℚ_[p]
⊢ (if x * y = 0 then ⊤ else ↑(valuation (x * y))) =
    (if x = 0 then ⊤ else ↑(valuation x)) + if y = 0 then ⊤ else ↑(valuation y)

tactic: rw [hx, if_pos (Eq.refl _), MulZeroClass.zero_mul, if_pos (Eq.refl _), WithTop.top_add]
state_before: case pos
p : ℕ
hp : Fact (Nat.Prime p)
x y : ℚ_[p]
hx : x = 0
⊢ (if x * y = 0 then ⊤ else ↑(valuation (x * y))) =
    (if x = 0 then ⊤ else ↑(valuation x)) + if y = 0 then ⊤ else ↑(valuation y)

tactic: by_cases hy : y = 0
state_before: case neg
p : ℕ
hp : Fact (Nat.Prime p)
x y : ℚ_[p]
hx : ¬x = 0
⊢ (if x * y = 0 then ⊤ else ↑(valuation (x * y))) =
    (if x = 0 then ⊤ else ↑(valuation x)) + if y = 0 then ⊤ else ↑(valuation y)

tactic: rw [hy, if_pos (Eq.refl _), MulZeroClass.mul_zero, if_pos (Eq.refl _), WithTop.add_top]
state_before: case pos
p : ℕ
hp : Fact (Nat.Prime p)
x y : ℚ_[p]
hx : ¬x = 0
hy : y = 0
⊢ (if x * y = 0 then ⊤ else ↑(valuation (x * y))) =
    (if x = 0 then ⊤ else ↑(valuation x)) + if y = 0 then ⊤ else ↑(valuation y)

tactic: rw [if_neg hx, if_neg hy, if_neg (mul_ne_zero hx hy), ← WithTop.coe_add, WithTop.coe_eq_coe,
  valuation_map_mul hx hy]
state_before: case neg
p : ℕ
hp : Fact (Nat.Prime p)
x y : ℚ_[p]
hx : ¬x = 0
hy : ¬y = 0
⊢ (if x * y = 0 then ⊤ else ↑(valuation (x * y))) =
    (if x = 0 then ⊤ else ↑(valuation x)) + if y = 0 then ⊤ else ↑(valuation y)
Theorem: CauSeq.Completion.inv_mk
File: Mathlib/Data/Real/CauSeqCompletion.lean

tactic: rw [dif_neg]
state_before: α : Type u_1
inst✝² : LinearOrderedField α
β : Type u_2
inst✝¹ : DivisionRing β
abv : β → α
inst✝ : IsAbsoluteValue abv
f : CauSeq β abv
hf : ¬LimZero f
⊢ (if h : LimZero f then 0 else inv f h) = inv f hf
Theorem: sup_eq_left
File: Mathlib/Order/Lattice.lean

tactic: simp [le_rfl]
state_before: α : Type u
β : Type v
inst✝ : SemilatticeSup α
a b c d : α
⊢ a ⊔ b ≤ a ∧ a ≤ a ⊔ b ↔ b ≤ a
Theorem: Units.divp_sub_divp
File: Mathlib/Algebra/Ring/Units.lean

tactic: simp only [sub_eq_add_neg, neg_divp, divp_add_divp, mul_neg]
state_before: α : Type u
β : Type v
γ : Type w
R : Type x
inst✝ : CommRing α
a b : α
u₁ u₂ : αˣ
⊢ a /ₚ u₁ - b /ₚ u₂ = (a * ↑u₂ - ↑u₁ * b) /ₚ (u₁ * u₂)
Theorem: Nat.gcd_add_mul_left_left
File: Mathlib/Data/Nat/GCD/Basic.lean

tactic: rw [gcd_comm, gcd_add_mul_left_right, gcd_comm]
state_before: m n k : ℕ
⊢ gcd (m + n * k) n = gcd m n
Theorem: TopologicalSpace.Opens.mapIso_inv_app
File: Mathlib/Topology/Category/TopCat/Opens.lean

tactic: rw [h]
state_before: X Y Z : TopCat
f g : X ⟶ Y
h : f = g
U : Opens ↑Y
⊢ (map g).obj U = (map f).obj U
Theorem: Nat.ArithmeticFunction.moebius_apply_prime_pow
File: Mathlib/NumberTheory/ArithmeticFunction.lean

tactic: split_ifs with h
state_before: R : Type ?u.590526
p k : ℕ
hp : Prime p
hk : k ≠ 0
⊢ ↑μ (p ^ k) = if k = 1 then -1 else 0

tactic: rw [moebius_eq_zero_of_not_squarefree]
state_before: case inr
R : Type ?u.590526
p k : ℕ
hp : Prime p
hk : k ≠ 0
h : ¬k = 1
⊢ ↑μ (p ^ k) = 0

tactic: rw [squarefree_pow_iff hp.ne_one hk, not_and_or]
state_before: case inr
R : Type ?u.590526
p k : ℕ
hp : Prime p
hk : k ≠ 0
h : ¬k = 1
⊢ ¬Squarefree (p ^ k)

tactic: exact Or.inr h
state_before: case inr
R : Type ?u.590526
p k : ℕ
hp : Prime p
hk : k ≠ 0
h : ¬k = 1
⊢ ¬Squarefree p ∨ ¬k = 1

tactic: rw [h, pow_one, moebius_apply_prime hp]
state_before: case inl
R : Type ?u.590526
p k : ℕ
hp : Prime p
hk : k ≠ 0
h : k = 1
⊢ ↑μ (p ^ k) = -1
Theorem: nhdsWithin_empty
File: Mathlib/Topology/ContinuousOn.lean

tactic: rw [nhdsWithin, principal_empty, inf_bot_eq]
state_before: α : Type u_1
β : Type ?u.13308
γ : Type ?u.13311
δ : Type ?u.13314
inst✝ : TopologicalSpace α
a : α
⊢ 𝓝[∅] a = ⊥
Theorem: ContinuousLinearEquiv.ext₁
File: Mathlib/Topology/Algebra/Module/Basic.lean

tactic: rw [← smul_eq_mul, map_smul, h, map_smul]
state_before: R₁ : Type u_1
R₂ : Type ?u.1520303
R₃ : Type ?u.1520306
inst✝²⁵ : Semiring R₁
inst✝²⁴ : Semiring R₂
inst✝²³ : Semiring R₃
σ₁₂ : R₁ →+* R₂
σ₂₁ : R₂ →+* R₁
inst✝²² : RingHomInvPair σ₁₂ σ₂₁
inst✝²¹ : RingHomInvPair σ₂₁ σ₁₂
σ₂₃ : R₂ →+* R₃
σ₃₂ : R₃ →+* R₂
inst✝²⁰ : RingHomInvPair σ₂₃ σ₃₂
inst✝¹⁹ : RingHomInvPair σ₃₂ σ₂₃
σ₁₃ : R₁ →+* R₃
σ₃₁ : R₃ →+* R₁
inst✝¹⁸ : RingHomInvPair σ₁₃ σ₃₁
inst✝¹⁷ : RingHomInvPair σ₃₁ σ₁₃
inst✝¹⁶ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃
inst✝¹⁵ : RingHomCompTriple σ₃₂ σ₂₁ σ₃₁
M₁ : Type u_2
inst✝¹⁴ : TopologicalSpace M₁
inst✝¹³ : AddCommMonoid M₁
M'₁ : Type ?u.1521160
inst✝¹² : TopologicalSpace M'₁
inst✝¹¹ : AddCommMonoid M'₁
M₂ : Type ?u.1521169
inst✝¹⁰ : TopologicalSpace M₂
inst✝⁹ : AddCommMonoid M₂
M₃ : Type ?u.1521178
inst✝⁸ : TopologicalSpace M₃
inst✝⁷ : AddCommMonoid M₃
M₄ : Type ?u.1521187
inst✝⁶ : TopologicalSpace M₄
inst✝⁵ : AddCommMonoid M₄
inst✝⁴ : Module R₁ M₁
inst✝³ : Module R₁ M'₁
inst✝² : Module R₂ M₂
inst✝¹ : Module R₃ M₃
inst✝ : TopologicalSpace R₁
f g : R₁ ≃L[R₁] M₁
h : ↑f 1 = ↑g 1
x : R₁
⊢ ↑f (x * 1) = ↑g (x * 1)
Theorem: TendstoUniformlyOn.prod_map
File: Mathlib/Topology/UniformSpace/UniformConvergence.lean

tactic: rw [tendstoUniformlyOn_iff_tendstoUniformlyOnFilter] at h h'⊢
state_before: α : Type u
β : Type v
γ : Type w
ι : Type x
inst✝¹ : UniformSpace β
F : ι → α → β
f : α → β
s s'✝ : Set α
x : α
p : Filter ι
p'✝ : Filter α
g : ι → α
ι' : Type u_1
α' : Type u_2
β' : Type u_3
inst✝ : UniformSpace β'
F' : ι' → α' → β'
f' : α' → β'
p' : Filter ι'
s' : Set α'
h : TendstoUniformlyOn F f p s
h' : TendstoUniformlyOn F' f' p' s'
⊢ TendstoUniformlyOn (fun i => Prod.map (F i.fst) (F' i.snd)) (Prod.map f f') (p ×ˢ p') (s ×ˢ s')

tactic: simpa only [prod_principal_principal] using h.prod_map h'
state_before: α : Type u
β : Type v
γ : Type w
ι : Type x
inst✝¹ : UniformSpace β
F : ι → α → β
f : α → β
s s'✝ : Set α
x : α
p : Filter ι
p'✝ : Filter α
g : ι → α
ι' : Type u_1
α' : Type u_2
β' : Type u_3
inst✝ : UniformSpace β'
F' : ι' → α' → β'
f' : α' → β'
p' : Filter ι'
s' : Set α'
h : TendstoUniformlyOnFilter F f p (𝓟 s)
h' : TendstoUniformlyOnFilter F' f' p' (𝓟 s')
⊢ TendstoUniformlyOnFilter (fun i => Prod.map (F i.fst) (F' i.snd)) (Prod.map f f') (p ×ˢ p') (𝓟 (s ×ˢ s'))
Theorem: UniformSpace.SeparationQuotient.lift_mk
File: Mathlib/Topology/UniformSpace/Separation.lean

tactic: rw [lift, dif_pos h]
state_before: α : Type u
β : Type v
γ : Type w
inst✝³ : UniformSpace α
inst✝² : UniformSpace β
inst✝¹ : UniformSpace γ
inst✝ : SeparatedSpace β
f : α → β
h : UniformContinuous f
a : α
⊢ lift f (Quotient.mk (separationSetoid α) a) = f a

tactic: rfl
state_before: α : Type u
β : Type v
γ : Type w
inst✝³ : UniformSpace α
inst✝² : UniformSpace β
inst✝¹ : UniformSpace γ
inst✝ : SeparatedSpace β
f : α → β
h : UniformContinuous f
a : α
⊢ Quotient.lift f (_ : ∀ (x x_1 : α), x ≈ x_1 → f x = f x_1) (Quotient.mk (separationSetoid α) a) = f a
Theorem: HomologicalComplex.image_to_eq_image
File: Mathlib/Algebra/Homology/HomologicalComplex.lean

tactic: rw [C.dTo_eq r]
state_before: ι : Type u_1
V : Type u
inst✝³ : Category V
inst✝² : HasZeroMorphisms V
c : ComplexShape ι
C : HomologicalComplex V c
inst✝¹ : HasImages V
inst✝ : HasEqualizers V
i j : ι
r : ComplexShape.Rel c i j
⊢ imageSubobject (dTo C j) = imageSubobject (d C i j)

tactic: apply imageSubobject_iso_comp
state_before: ι : Type u_1
V : Type u
inst✝³ : Category V
inst✝² : HasZeroMorphisms V
c : ComplexShape ι
C : HomologicalComplex V c
inst✝¹ : HasImages V
inst✝ : HasEqualizers V
i j : ι
r : ComplexShape.Rel c i j
⊢ imageSubobject ((xPrevIso C r).hom ≫ d C i j) = imageSubobject (d C i j)
Theorem: Equiv.Perm.sameCycle_pow_right
File: Mathlib/GroupTheory/Perm/Cycle/Basic.lean

tactic: rw [← zpow_ofNat, sameCycle_zpow_right]
state_before: ι : Type ?u.173585
α : Type u_1
β : Type ?u.173591
f g : Perm α
p : α → Prop
x y z : α
n : ℕ
⊢ SameCycle f x (↑(f ^ n) y) ↔ SameCycle f x y
Theorem: List.Chain'.append_overlap
File: Mathlib/Data/List/Chain.lean

tactic: simpa only [getLast?_append_of_ne_nil _ hn] using (chain'_append.1 h₂).2.2
state_before: α : Type u
β : Type v
R r : α → α → Prop
l l₁✝ l₂✝ : List α
a b : α
l₁ l₂ l₃ : List α
h₁ : Chain' R (l₁ ++ l₂)
h₂ : Chain' R (l₂ ++ l₃)
hn : l₂ ≠ []
⊢ ∀ (x : α), x ∈ getLast? (l₁ ++ l₂) → ∀ (y : α), y ∈ head? l₃ → R x y
Theorem: Ordinal.log_eq_zero
File: Mathlib/SetTheory/Ordinal/Exponential.lean

tactic: rcases eq_or_ne o 0 with (rfl | ho)
state_before: b o : Ordinal
hbo : o < b
⊢ log b o = 0

tactic: cases' le_or_lt b 1 with hb hb
state_before: case inr
b o : Ordinal
hbo : o < b
ho : o ≠ 0
⊢ log b o = 0

tactic: exact log_zero_right b
state_before: case inl
b : Ordinal
hbo : 0 < b
⊢ log b 0 = 0

tactic: rcases le_one_iff.1 hb with (rfl | rfl)
state_before: case inr.inl
b o : Ordinal
hbo : o < b
ho : o ≠ 0
hb : b ≤ 1
⊢ log b o = 0

tactic: exact log_zero_left o
state_before: case inr.inl.inl
o : Ordinal
ho : o ≠ 0
hbo : o < 0
hb : 0 ≤ 1
⊢ log 0 o = 0

tactic: exact log_one_left o
state_before: case inr.inl.inr
o : Ordinal
ho : o ≠ 0
hbo : o < 1
hb : 1 ≤ 1
⊢ log 1 o = 0

tactic: rwa [← Ordinal.le_zero, ← lt_succ_iff, succ_zero, ← lt_opow_iff_log_lt hb ho, opow_one]
state_before: case inr.inr
b o : Ordinal
hbo : o < b
ho : o ≠ 0
hb : 1 < b
⊢ log b o = 0
Theorem: Equiv.Perm.support_cycleOf_eq_nil_iff
File: Mathlib/GroupTheory/Perm/Cycle/Basic.lean

tactic: simp
state_before: ι : Type ?u.2512943
α : Type u_1
β : Type ?u.2512949
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f g : Perm α
x y : α
⊢ support (cycleOf f x) = ∅ ↔ ¬x ∈ support f
Theorem: MeasureTheory.exists_measure_pos_of_not_measure_iUnion_null
File: Mathlib/MeasureTheory/Measure/MeasureSpaceDef.lean

tactic: contrapose! hs
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.35949
δ : Type ?u.35952
ι : Type ?u.35955
inst✝¹ : MeasurableSpace α
μ μ₁ μ₂ : Measure α
s✝ s₁ s₂ t : Set α
inst✝ : Countable β
s : β → Set α
hs : ↑↑μ (⋃ (n : β), s n) ≠ 0
⊢ ∃ n, 0 < ↑↑μ (s n)

tactic: exact measure_iUnion_null fun n => nonpos_iff_eq_zero.1 (hs n)
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.35949
δ : Type ?u.35952
ι : Type ?u.35955
inst✝¹ : MeasurableSpace α
μ μ₁ μ₂ : Measure α
s✝ s₁ s₂ t : Set α
inst✝ : Countable β
s : β → Set α
hs : ∀ (n : β), ↑↑μ (s n) ≤ 0
⊢ ↑↑μ (⋃ (n : β), s n) = 0
Theorem: LinearMap.GeneralLinearGroup.generalLinearEquiv_to_linearMap
File: Mathlib/LinearAlgebra/GeneralLinearGroup.lean

tactic: ext
state_before: R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
f : GeneralLinearGroup R M
⊢ ↑(↑(generalLinearEquiv R M) f) = ↑f

tactic: rfl
state_before: case h
R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
f : GeneralLinearGroup R M
x✝ : M
⊢ ↑↑(↑(generalLinearEquiv R M) f) x✝ = ↑↑f x✝
Theorem: Polynomial.eval_unique
File: Mathlib/Data/Polynomial/AlgebraMap.lean

tactic: rw [← aeval_def, aeval_algHom, aeval_X_left, AlgHom.comp_id]
state_before: R : Type u
S : Type v
T : Type w
A : Type z
A' : Type ?u.863799
B' : Type ?u.863802
a b : R
n : ℕ
inst✝⁶ : CommSemiring A'
inst✝⁵ : Semiring B'
inst✝⁴ : CommSemiring R
p✝ q : R[X]
inst✝³ : Semiring A
inst✝² : Algebra R A
B : Type ?u.864015
inst✝¹ : Semiring B
inst✝ : Algebra R B
x : A
φ : R[X] →ₐ[R] A
p : R[X]
⊢ ↑φ p = eval₂ (algebraMap R A) (↑φ X) p
Theorem: le_one_div_of_neg
File: Mathlib/Algebra/Order/Field/Basic.lean

tactic: simpa using le_inv_of_neg ha hb
state_before: ι : Type ?u.158424
α : Type u_1
β : Type ?u.158430
inst✝ : LinearOrderedField α
a b c d : α
n : ℤ
ha : a < 0
hb : b < 0
⊢ a ≤ 1 / b ↔ b ≤ 1 / a
Theorem: Nat.SOM.Poly.denote_insertSorted
File: src/lean/Init/Data/Nat/SOM.lean

tactic: match p with
| [] => simp!
| (k', m') :: p =>
  by_cases h : m < m' <;> simp! [h, denote_insertSorted ctx k m p, Nat.add_assoc, Nat.add_comm, Nat.add_left_comm]
state_before: ctx : Context
k : Nat
m : Mon
p : Poly
⊢ denote ctx (insertSorted k m p) = denote ctx p + k * Mon.denote ctx m

tactic: simp!
state_before: ctx : Context
k : Nat
m : Mon
p : Poly
⊢ denote ctx (insertSorted k m []) = denote ctx [] + k * Mon.denote ctx m

tactic: by_cases h : m < m' <;> simp! [h, denote_insertSorted ctx k m p, Nat.add_assoc, Nat.add_comm, Nat.add_left_comm]
state_before: ctx : Context
k : Nat
m : Mon
p✝ : Poly
k' : Nat
m' : Mon
p : List (Nat × Mon)
⊢ denote ctx (insertSorted k m ((k', m') :: p)) = denote ctx ((k', m') :: p) + k * Mon.denote ctx m
Theorem: Asymptotics.isLittleO_pow_pow_atTop_of_lt
File: Mathlib/Analysis/Asymptotics/SpecificAsymptotics.lean

tactic: refine' (isLittleO_iff_tendsto' _).mpr (tendsto_pow_div_pow_atTop_zero hpq)
state_before: 𝕜 : Type u_1
inst✝¹ : NormedLinearOrderedField 𝕜
inst✝ : OrderTopology 𝕜
p q : ℕ
hpq : p < q
⊢ (fun x => x ^ p) =o[atTop] fun x => x ^ q

tactic: exact (eventually_gt_atTop 0).mono fun x hx hxq => (pow_ne_zero q hx.ne' hxq).elim
state_before: 𝕜 : Type u_1
inst✝¹ : NormedLinearOrderedField 𝕜
inst✝ : OrderTopology 𝕜
p q : ℕ
hpq : p < q
⊢ ∀ᶠ (x : 𝕜) in atTop, x ^ q = 0 → x ^ p = 0
Theorem: Nat.decreasingInduction_succ'
File: Mathlib/Data/Nat/Basic.lean

tactic: dsimp only [decreasingInduction]
state_before: m✝ n k : ℕ
P : ℕ → Sort u_1
h : (n : ℕ) → P (n + 1) → P n
m : ℕ
msm : m ≤ m + 1
hP : P (m + 1)
⊢ decreasingInduction h msm hP = h m hP

tactic: rw [leRecOn_succ']
state_before: m✝ n k : ℕ
P : ℕ → Sort u_1
h : (n : ℕ) → P (n + 1) → P n
m : ℕ
msm : m ≤ m + 1
hP : P (m + 1)
⊢ leRecOn msm (fun {k} ih hsk => ih (h k hsk)) (fun h => h) hP = h m hP
Theorem: Nat.ArithmeticFunction.moebius_apply_prime
File: Mathlib/NumberTheory/ArithmeticFunction.lean

tactic: rw [moebius_apply_of_squarefree hp.squarefree, cardFactors_apply_prime hp, pow_one]
state_before: R : Type ?u.590184
p : ℕ
hp : Prime p
⊢ ↑μ p = -1
Theorem: contDiffAt_inv
File: Mathlib/Analysis/Calculus/ContDiff.lean

tactic: simpa only [Ring.inverse_eq_inv'] using contDiffAt_ring_inverse 𝕜 (Units.mk0 x hx)
state_before: 𝕜 : Type u_2
inst✝¹⁵ : NontriviallyNormedField 𝕜
D : Type uD
inst✝¹⁴ : NormedAddCommGroup D
inst✝¹³ : NormedSpace 𝕜 D
E : Type uE
inst✝¹² : NormedAddCommGroup E
inst✝¹¹ : NormedSpace 𝕜 E
F : Type uF
inst✝¹⁰ : NormedAddCommGroup F
inst✝⁹ : NormedSpace 𝕜 F
G : Type uG
inst✝⁸ : NormedAddCommGroup G
inst✝⁷ : NormedSpace 𝕜 G
X : Type ?u.2636312
inst✝⁶ : NormedAddCommGroup X
inst✝⁵ : NormedSpace 𝕜 X
s s₁ t u : Set E
f f₁ : E → F
g : F → G
x✝ x₀ : E
c : F
b : E × F → G
m n✝ : ℕ∞
p : E → FormalMultilinearSeries 𝕜 E F
R : Type ?u.2639790
inst✝⁴ : NormedRing R
inst✝³ : NormedAlgebra 𝕜 R
𝕜' : Type u_1
inst✝² : NormedField 𝕜'
inst✝¹ : NormedAlgebra 𝕜 𝕜'
inst✝ : CompleteSpace 𝕜'
x : 𝕜'
hx : x ≠ 0
n : ℕ∞
⊢ ContDiffAt 𝕜 n Inv.inv x
Theorem: CategoryTheory.Idempotents.split_imp_of_iso
File: Mathlib/CategoryTheory/Idempotents/Basic.lean

tactic: rcases h with ⟨Y, i, e, ⟨h₁, h₂⟩⟩
state_before: C : Type u_2
inst✝ : Category C
X X' : C
φ : X ≅ X'
p : X ⟶ X
p' : X' ⟶ X'
hpp' : p ≫ φ.hom = φ.hom ≫ p'
h : ∃ Y i e, i ≫ e = 𝟙 Y ∧ e ≫ i = p
⊢ ∃ Y' i' e', i' ≫ e' = 𝟙 Y' ∧ e' ≫ i' = p'

tactic: use Y, i ≫ φ.hom, φ.inv ≫ e
state_before: case intro.intro.intro.intro
C : Type u_2
inst✝ : Category C
X X' : C
φ : X ≅ X'
p : X ⟶ X
p' : X' ⟶ X'
hpp' : p ≫ φ.hom = φ.hom ≫ p'
Y : C
i : Y ⟶ X
e : X ⟶ Y
h₁ : i ≫ e = 𝟙 Y
h₂ : e ≫ i = p
⊢ ∃ Y' i' e', i' ≫ e' = 𝟙 Y' ∧ e' ≫ i' = p'

tactic: constructor
state_before: case intro.intro.intro.intro
C : Type u_2
inst✝ : Category C
X X' : C
φ : X ≅ X'
p : X ⟶ X
p' : X' ⟶ X'
hpp' : p ≫ φ.hom = φ.hom ≫ p'
Y : C
i : Y ⟶ X
e : X ⟶ Y
h₁ : i ≫ e = 𝟙 Y
h₂ : e ≫ i = p
⊢ (i ≫ φ.hom) ≫ φ.inv ≫ e = 𝟙 Y ∧ (φ.inv ≫ e) ≫ i ≫ φ.hom = p'

tactic: slice_lhs 2 3 => rw [φ.hom_inv_id]
state_before: case intro.intro.intro.intro.left
C : Type u_2
inst✝ : Category C
X X' : C
φ : X ≅ X'
p : X ⟶ X
p' : X' ⟶ X'
hpp' : p ≫ φ.hom = φ.hom ≫ p'
Y : C
i : Y ⟶ X
e : X ⟶ Y
h₁ : i ≫ e = 𝟙 Y
h₂ : e ≫ i = p
⊢ (i ≫ φ.hom) ≫ φ.inv ≫ e = 𝟙 Y

tactic: rw [id_comp, h₁]
state_before: case intro.intro.intro.intro.left
C : Type u_2
inst✝ : Category C
X X' : C
φ : X ≅ X'
p : X ⟶ X
p' : X' ⟶ X'
hpp' : p ≫ φ.hom = φ.hom ≫ p'
Y : C
i : Y ⟶ X
e : X ⟶ Y
h₁ : i ≫ e = 𝟙 Y
h₂ : e ≫ i = p
⊢ i ≫ 𝟙 X ≫ e = 𝟙 Y

tactic: slice_lhs 2 3 => rw [h₂]
state_before: case intro.intro.intro.intro.right
C : Type u_2
inst✝ : Category C
X X' : C
φ : X ≅ X'
p : X ⟶ X
p' : X' ⟶ X'
hpp' : p ≫ φ.hom = φ.hom ≫ p'
Y : C
i : Y ⟶ X
e : X ⟶ Y
h₁ : i ≫ e = 𝟙 Y
h₂ : e ≫ i = p
⊢ (φ.inv ≫ e) ≫ i ≫ φ.hom = p'

tactic: rw [hpp', ← assoc, φ.inv_hom_id, id_comp]
state_before: case intro.intro.intro.intro.right
C : Type u_2
inst✝ : Category C
X X' : C
φ : X ≅ X'
p : X ⟶ X
p' : X' ⟶ X'
hpp' : p ≫ φ.hom = φ.hom ≫ p'
Y : C
i : Y ⟶ X
e : X ⟶ Y
h₁ : i ≫ e = 𝟙 Y
h₂ : e ≫ i = p
⊢ φ.inv ≫ p ≫ φ.hom = p'
Theorem: Polynomial.support_scaleRoots_eq
File: Mathlib/RingTheory/Polynomial/ScaleRoots.lean

tactic: intro i
state_before: A : Type ?u.32461
K : Type ?u.32464
R : Type u_1
S : Type ?u.32470
inst✝⁴ : CommRing A
inst✝³ : IsDomain A
inst✝² : Field K
inst✝¹ : CommRing R
inst✝ : CommRing S
M : Submonoid A
p : R[X]
s : R
hs : s ∈ nonZeroDivisors R
⊢ support p ≤ support (scaleRoots p s)

tactic: simp only [coeff_scaleRoots, Polynomial.mem_support_iff]
state_before: A : Type ?u.32461
K : Type ?u.32464
R : Type u_1
S : Type ?u.32470
inst✝⁴ : CommRing A
inst✝³ : IsDomain A
inst✝² : Field K
inst✝¹ : CommRing R
inst✝ : CommRing S
M : Submonoid A
p : R[X]
s : R
hs : s ∈ nonZeroDivisors R
i : ℕ
⊢ i ∈ support p → i ∈ support (scaleRoots p s)

tactic: intro p_ne_zero ps_zero
state_before: A : Type ?u.32461
K : Type ?u.32464
R : Type u_1
S : Type ?u.32470
inst✝⁴ : CommRing A
inst✝³ : IsDomain A
inst✝² : Field K
inst✝¹ : CommRing R
inst✝ : CommRing S
M : Submonoid A
p : R[X]
s : R
hs : s ∈ nonZeroDivisors R
i : ℕ
⊢ coeff p i ≠ 0 → coeff p i * s ^ (natDegree p - i) ≠ 0

tactic: have := pow_mem hs (p.natDegree - i) _ ps_zero
state_before: A : Type ?u.32461
K : Type ?u.32464
R : Type u_1
S : Type ?u.32470
inst✝⁴ : CommRing A
inst✝³ : IsDomain A
inst✝² : Field K
inst✝¹ : CommRing R
inst✝ : CommRing S
M : Submonoid A
p : R[X]
s : R
hs : s ∈ nonZeroDivisors R
i : ℕ
p_ne_zero : coeff p i ≠ 0
ps_zero : coeff p i * s ^ (natDegree p - i) = 0
⊢ False

tactic: contradiction
state_before: A : Type ?u.32461
K : Type ?u.32464
R : Type u_1
S : Type ?u.32470
inst✝⁴ : CommRing A
inst✝³ : IsDomain A
inst✝² : Field K
inst✝¹ : CommRing R
inst✝ : CommRing S
M : Submonoid A
p : R[X]
s : R
hs : s ∈ nonZeroDivisors R
i : ℕ
p_ne_zero : coeff p i ≠ 0
ps_zero : coeff p i * s ^ (natDegree p - i) = 0
this : coeff p i = 0
⊢ False
Theorem: Finset.right_mem_Ioc
File: Mathlib/Data/Finset/LocallyFinite.lean

tactic: simp only [mem_Ioc, and_true_iff, le_rfl]
state_before: ι : Type ?u.4890
α : Type u_1
inst✝¹ : Preorder α
inst✝ : LocallyFiniteOrder α
a a₁ a₂ b b₁ b₂ c x : α
⊢ b ∈ Ioc a b ↔ a < b
Theorem: MeasureTheory.ae_map_mem_range
File: Mathlib/MeasureTheory/Measure/MeasureSpace.lean

tactic: by_cases h : AEMeasurable f μ
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.551485
δ : Type ?u.551488
ι : Type ?u.551491
R : Type ?u.551494
R' : Type ?u.551497
m0✝ : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
μ✝ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s s' t : Set α
m0 : MeasurableSpace α
f : α → β
hf : MeasurableSet (range f)
μ : Measure α
⊢ ∀ᵐ (x : β) ∂Measure.map f μ, x ∈ range f

tactic: change range f ∈ (μ.map f).ae
state_before: case pos
α : Type u_1
β : Type u_2
γ : Type ?u.551485
δ : Type ?u.551488
ι : Type ?u.551491
R : Type ?u.551494
R' : Type ?u.551497
m0✝ : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
μ✝ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s s' t : Set α
m0 : MeasurableSpace α
f : α → β
hf : MeasurableSet (range f)
μ : Measure α
h : AEMeasurable f
⊢ ∀ᵐ (x : β) ∂Measure.map f μ, x ∈ range f

tactic: rw [mem_ae_map_iff h hf]
state_before: case pos
α : Type u_1
β : Type u_2
γ : Type ?u.551485
δ : Type ?u.551488
ι : Type ?u.551491
R : Type ?u.551494
R' : Type ?u.551497
m0✝ : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
μ✝ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s s' t : Set α
m0 : MeasurableSpace α
f : α → β
hf : MeasurableSet (range f)
μ : Measure α
h : AEMeasurable f
⊢ range f ∈ ae (Measure.map f μ)

tactic: apply eventually_of_forall
state_before: case pos
α : Type u_1
β : Type u_2
γ : Type ?u.551485
δ : Type ?u.551488
ι : Type ?u.551491
R : Type ?u.551494
R' : Type ?u.551497
m0✝ : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
μ✝ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s s' t : Set α
m0 : MeasurableSpace α
f : α → β
hf : MeasurableSet (range f)
μ : Measure α
h : AEMeasurable f
⊢ f ⁻¹' range f ∈ ae μ

tactic: exact mem_range_self
state_before: case pos.hp
α : Type u_1
β : Type u_2
γ : Type ?u.551485
δ : Type ?u.551488
ι : Type ?u.551491
R : Type ?u.551494
R' : Type ?u.551497
m0✝ : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
μ✝ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s s' t : Set α
m0 : MeasurableSpace α
f : α → β
hf : MeasurableSet (range f)
μ : Measure α
h : AEMeasurable f
⊢ ∀ (x : α), f x ∈ range f

tactic: simp [map_of_not_aemeasurable h]
state_before: case neg
α : Type u_1
β : Type u_2
γ : Type ?u.551485
δ : Type ?u.551488
ι : Type ?u.551491
R : Type ?u.551494
R' : Type ?u.551497
m0✝ : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
μ✝ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s s' t : Set α
m0 : MeasurableSpace α
f : α → β
hf : MeasurableSet (range f)
μ : Measure α
h : ¬AEMeasurable f
⊢ ∀ᵐ (x : β) ∂Measure.map f μ, x ∈ range f
Theorem: EuclideanGeometry.Sphere.secondInter_collinear
File: Mathlib/Geometry/Euclidean/Sphere/SecondInter.lean

tactic: rw [Set.pair_comm, Set.insert_comm]
state_before: V : Type u_2
P : Type u_1
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
s : Sphere P
p p' : P
⊢ Collinear ℝ {p, p', secondInter s p (p' -ᵥ p)}

tactic: exact
  (collinear_insert_iff_of_mem_affineSpan (s.secondInter_vsub_mem_affineSpan _ _)).2
    (collinear_pair ℝ _ _)
state_before: V : Type u_2
P : Type u_1
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
s : Sphere P
p p' : P
⊢ Collinear ℝ {secondInter s p (p' -ᵥ p), p, p'}
Theorem: Multiset.count_erase_self
File: Mathlib/Data/Multiset/Basic.lean

tactic: convert List.count_erase_self a l <;> rw [←coe_count] <;> simp
state_before: α : Type u_1
β : Type ?u.365585
γ : Type ?u.365588
inst✝ : DecidableEq α
a : α
s : Multiset α
l : List α
⊢ count a (erase (Quotient.mk (isSetoid α) l) a) = count a (Quotient.mk (isSetoid α) l) - 1