tasksource/leandojo huggingface dataset:
Theorem: leibniz_cross
File: Mathlib/LinearAlgebra/CrossProduct.lean

tactic: simp_rw [cross_apply, vec3_add]
state_before: R : Type u_1
inst✝ : CommRing R
u v w : Fin 3 → R
⊢ ↑(↑crossProduct u) (↑(↑crossProduct v) w) =
    ↑(↑crossProduct (↑(↑crossProduct u) v)) w + ↑(↑crossProduct v) (↑(↑crossProduct u) w)

tactic: apply vec3_eq <;> norm_num <;> ring
state_before: R : Type u_1
inst✝ : CommRing R
u v w : Fin 3 → R
⊢ ![u 1 * vecCons (v 1 * w 2 - v 2 * w 1) ![v 2 * w 0 - v 0 * w 2, v 0 * w 1 - v 1 * w 0] 2 -
        u 2 * vecCons (v 1 * w 2 - v 2 * w 1) ![v 2 * w 0 - v 0 * w 2, v 0 * w 1 - v 1 * w 0] 1,
      u 2 * vecCons (v 1 * w 2 - v 2 * w 1) ![v 2 * w 0 - v 0 * w 2, v 0 * w 1 - v 1 * w 0] 0 -
        u 0 * vecCons (v 1 * w 2 - v 2 * w 1) ![v 2 * w 0 - v 0 * w 2, v 0 * w 1 - v 1 * w 0] 2,
      u 0 * vecCons (v 1 * w 2 - v 2 * w 1) ![v 2 * w 0 - v 0 * w 2, v 0 * w 1 - v 1 * w 0] 1 -
        u 1 * vecCons (v 1 * w 2 - v 2 * w 1) ![v 2 * w 0 - v 0 * w 2, v 0 * w 1 - v 1 * w 0] 0] =
    ![vecCons (u 1 * v 2 - u 2 * v 1) ![u 2 * v 0 - u 0 * v 2, u 0 * v 1 - u 1 * v 0] 1 * w 2 -
          vecCons (u 1 * v 2 - u 2 * v 1) ![u 2 * v 0 - u 0 * v 2, u 0 * v 1 - u 1 * v 0] 2 * w 1 +
        (v 1 * vecCons (u 1 * w 2 - u 2 * w 1) ![u 2 * w 0 - u 0 * w 2, u 0 * w 1 - u 1 * w 0] 2 -
          v 2 * vecCons (u 1 * w 2 - u 2 * w 1) ![u 2 * w 0 - u 0 * w 2, u 0 * w 1 - u 1 * w 0] 1),
      vecCons (u 1 * v 2 - u 2 * v 1) ![u 2 * v 0 - u 0 * v 2, u 0 * v 1 - u 1 * v 0] 2 * w 0 -
          vecCons (u 1 * v 2 - u 2 * v 1) ![u 2 * v 0 - u 0 * v 2, u 0 * v 1 - u 1 * v 0] 0 * w 2 +
        (v 2 * vecCons (u 1 * w 2 - u 2 * w 1) ![u 2 * w 0 - u 0 * w 2, u 0 * w 1 - u 1 * w 0] 0 -
          v 0 * vecCons (u 1 * w 2 - u 2 * w 1) ![u 2 * w 0 - u 0 * w 2, u 0 * w 1 - u 1 * w 0] 2),
      vecCons (u 1 * v 2 - u 2 * v 1) ![u 2 * v 0 - u 0 * v 2, u 0 * v 1 - u 1 * v 0] 0 * w 1 -
          vecCons (u 1 * v 2 - u 2 * v 1) ![u 2 * v 0 - u 0 * v 2, u 0 * v 1 - u 1 * v 0] 1 * w 0 +
        (v 0 * vecCons (u 1 * w 2 - u 2 * w 1) ![u 2 * w 0 - u 0 * w 2, u 0 * w 1 - u 1 * w 0] 1 -
          v 1 * vecCons (u 1 * w 2 - u 2 * w 1) ![u 2 * w 0 - u 0 * w 2, u 0 * w 1 - u 1 * w 0] 0)]
Theorem: Ordinal.cof_add
File: Mathlib/SetTheory/Cardinal/Cofinality.lean

tactic: rcases zero_or_succ_or_limit b with (rfl | ⟨c, rfl⟩ | hb)
state_before: α : Type ?u.99924
r : α → α → Prop
a b : Ordinal
h : b ≠ 0
⊢ cof (a + b) = cof b

tactic: contradiction
state_before: case inl
α : Type ?u.99924
r : α → α → Prop
a : Ordinal
h : 0 ≠ 0
⊢ cof (a + 0) = cof 0

tactic: rw [add_succ, cof_succ, cof_succ]
state_before: case inr.inl.intro
α : Type ?u.99924
r : α → α → Prop
a c : Ordinal
h : succ c ≠ 0
⊢ cof (a + succ c) = cof (succ c)

tactic: exact (add_isNormal a).cof_eq hb
state_before: case inr.inr
α : Type ?u.99924
r : α → α → Prop
a b : Ordinal
h : b ≠ 0
hb : IsLimit b
⊢ cof (a + b) = cof b
Theorem: ContinuousLinearMap.zero_comp
File: Mathlib/Topology/Algebra/Module/Basic.lean

tactic: ext
state_before: R₁ : Type u_1
R₂ : Type u_2
R₃ : Type u_6
inst✝¹⁷ : Semiring R₁
inst✝¹⁶ : Semiring R₂
inst✝¹⁵ : Semiring R₃
σ₁₂ : R₁ →+* R₂
σ₂₃ : R₂ →+* R₃
σ₁₃ : R₁ →+* R₃
M₁ : Type u_3
inst✝¹⁴ : TopologicalSpace M₁
inst✝¹³ : AddCommMonoid M₁
M'₁ : Type ?u.517394
inst✝¹² : TopologicalSpace M'₁
inst✝¹¹ : AddCommMonoid M'₁
M₂ : Type u_4
inst✝¹⁰ : TopologicalSpace M₂
inst✝⁹ : AddCommMonoid M₂
M₃ : Type u_5
inst✝⁸ : TopologicalSpace M₃
inst✝⁷ : AddCommMonoid M₃
M₄ : Type ?u.517421
inst✝⁶ : TopologicalSpace M₄
inst✝⁵ : AddCommMonoid M₄
inst✝⁴ : Module R₁ M₁
inst✝³ : Module R₁ M'₁
inst✝² : Module R₂ M₂
inst✝¹ : Module R₃ M₃
inst✝ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃
f : M₁ →SL[σ₁₂] M₂
⊢ comp 0 f = 0

tactic: simp
state_before: case h
R₁ : Type u_1
R₂ : Type u_2
R₃ : Type u_6
inst✝¹⁷ : Semiring R₁
inst✝¹⁶ : Semiring R₂
inst✝¹⁵ : Semiring R₃
σ₁₂ : R₁ →+* R₂
σ₂₃ : R₂ →+* R₃
σ₁₃ : R₁ →+* R₃
M₁ : Type u_3
inst✝¹⁴ : TopologicalSpace M₁
inst✝¹³ : AddCommMonoid M₁
M'₁ : Type ?u.517394
inst✝¹² : TopologicalSpace M'₁
inst✝¹¹ : AddCommMonoid M'₁
M₂ : Type u_4
inst✝¹⁰ : TopologicalSpace M₂
inst✝⁹ : AddCommMonoid M₂
M₃ : Type u_5
inst✝⁸ : TopologicalSpace M₃
inst✝⁷ : AddCommMonoid M₃
M₄ : Type ?u.517421
inst✝⁶ : TopologicalSpace M₄
inst✝⁵ : AddCommMonoid M₄
inst✝⁴ : Module R₁ M₁
inst✝³ : Module R₁ M'₁
inst✝² : Module R₂ M₂
inst✝¹ : Module R₃ M₃
inst✝ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃
f : M₁ →SL[σ₁₂] M₂
x✝ : M₁
⊢ ↑(comp 0 f) x✝ = ↑0 x✝
Theorem: FiniteDimensional.finiteDimensional_of_finrank
File: Mathlib/LinearAlgebra/FiniteDimensional.lean

tactic: contrapose h
state_before: K : Type u
V : Type v
inst✝⁴ : DivisionRing K
inst✝³ : AddCommGroup V
inst✝² : Module K V
V₂ : Type v'
inst✝¹ : AddCommGroup V₂
inst✝ : Module K V₂
h : 0 < finrank K V
⊢ FiniteDimensional K V

tactic: simp [finrank_of_infinite_dimensional h]
state_before: K : Type u
V : Type v
inst✝⁴ : DivisionRing K
inst✝³ : AddCommGroup V
inst✝² : Module K V
V₂ : Type v'
inst✝¹ : AddCommGroup V₂
inst✝ : Module K V₂
h : ¬FiniteDimensional K V
⊢ ¬0 < finrank K V
Theorem: Finset.prod_subset_one_on_sdiff
File: Mathlib/Algebra/BigOperators/Basic.lean

tactic: rw [← prod_sdiff h, prod_eq_one hg, one_mul]
state_before: ι : Type ?u.331175
β : Type u
α : Type v
γ : Type w
s s₁ s₂ : Finset α
a : α
f g : α → β
inst✝¹ : CommMonoid β
inst✝ : DecidableEq α
h : s₁ ⊆ s₂
hg : ∀ (x : α), x ∈ s₂ \ s₁ → g x = 1
hfg : ∀ (x : α), x ∈ s₁ → f x = g x
⊢ ∏ i in s₁, f i = ∏ i in s₂, g i

tactic: exact prod_congr rfl hfg
state_before: ι : Type ?u.331175
β : Type u
α : Type v
γ : Type w
s s₁ s₂ : Finset α
a : α
f g : α → β
inst✝¹ : CommMonoid β
inst✝ : DecidableEq α
h : s₁ ⊆ s₂
hg : ∀ (x : α), x ∈ s₂ \ s₁ → g x = 1
hfg : ∀ (x : α), x ∈ s₁ → f x = g x
⊢ ∏ i in s₁, f i = ∏ x in s₁, g x
Theorem: Nat.sub_lt_sub_left
File: src/lean/Init/Data/Nat/Basic.lean

tactic: rw [Nat.add_sub_add_right]
state_before: m n : Nat
x✝¹ : 0 < m + 1
x✝ : 0 < n + 1
⊢ m + 1 - (n + 1) < m + 1 - 0

tactic: exact lt_succ_of_le (Nat.sub_le _ _)
state_before: m n : Nat
x✝¹ : 0 < m + 1
x✝ : 0 < n + 1
⊢ m - n < m + 1 - 0

tactic: rw [Nat.add_sub_add_right, Nat.add_sub_add_right]
state_before: k m n : Nat
h1 : k + 1 < m + 1
h2 : k + 1 < n + 1
⊢ m + 1 - (n + 1) < m + 1 - (k + 1)

tactic: exact Nat.sub_lt_sub_left (Nat.lt_of_succ_lt_succ h1) (Nat.lt_of_succ_lt_succ h2)
state_before: k m n : Nat
h1 : k + 1 < m + 1
h2 : k + 1 < n + 1
⊢ m - n < m - k
Theorem: Set.op_smul_set_smul_eq_smul_smul_set
File: Mathlib/Data/Set/Pointwise/SMul.lean

tactic: ext
state_before: F : Type ?u.52743
α : Type u_3
β : Type u_1
γ : Type u_2
inst✝² : SMul αᵐᵒᵖ β
inst✝¹ : SMul β γ
inst✝ : SMul α γ
a : α
s : Set β
t : Set γ
h : ∀ (a : α) (b : β) (c : γ), (op a • b) • c = b • a • c
⊢ (op a • s) • t = s • a • t

tactic: simp [mem_smul, mem_smul_set, h]
state_before: case h
F : Type ?u.52743
α : Type u_3
β : Type u_1
γ : Type u_2
inst✝² : SMul αᵐᵒᵖ β
inst✝¹ : SMul β γ
inst✝ : SMul α γ
a : α
s : Set β
t : Set γ
h : ∀ (a : α) (b : β) (c : γ), (op a • b) • c = b • a • c
x✝ : γ
⊢ x✝ ∈ (op a • s) • t ↔ x✝ ∈ s • a • t
Theorem: Nat.zero_descFactorial_succ
File: Mathlib/Data/Nat/Factorial/Basic.lean

tactic: rw [descFactorial_succ, zero_tsub, zero_mul]
state_before: k : ℕ
⊢ descFactorial 0 (succ k) = 0
Theorem: Polynomial.natDegree_taylor
File: Mathlib/Data/Polynomial/Taylor.lean

tactic: refine' map_natDegree_eq_natDegree _ _
state_before: R : Type u_1
inst✝ : Semiring R
r✝ : R
f p : R[X]
r : R
⊢ natDegree (↑(taylor r) p) = natDegree p

tactic: nontriviality R
state_before: R : Type u_1
inst✝ : Semiring R
r✝ : R
f p : R[X]
r : R
⊢ ∀ (n : ℕ) (c : R), c ≠ 0 → natDegree (↑(taylor r) (↑(monomial n) c)) = n

tactic: intro n c c0
state_before: R : Type u_1
inst✝ : Semiring R
r✝ : R
f p : R[X]
r : R
✝ : Nontrivial R
⊢ ∀ (n : ℕ) (c : R), c ≠ 0 → natDegree (↑(taylor r) (↑(monomial n) c)) = n

tactic: simp [taylor_monomial, natDegree_C_mul_eq_of_mul_ne_zero, natDegree_pow_X_add_C, c0]
state_before: R : Type u_1
inst✝ : Semiring R
r✝ : R
f p : R[X]
r : R
✝ : Nontrivial R
n : ℕ
c : R
c0 : c ≠ 0
⊢ natDegree (↑(taylor r) (↑(monomial n) c)) = n
Theorem: NNReal.sqrt_eq_zero
File: Mathlib/Data/Real/Sqrt.lean

tactic: rw [eq_comm, sq, zero_mul]
state_before: x y : ℝ≥0
⊢ 0 ^ 2 = x ↔ x = 0
Theorem: CofiniteTopology.isOpen_iff'
File: Mathlib/Topology/Constructions.lean

tactic: simp only [isOpen_iff, nonempty_iff_ne_empty, or_iff_not_imp_left]
state_before: α : Type u
β : Type v
γ : Type ?u.17451
δ : Type ?u.17454
ε : Type ?u.17457
ζ : Type ?u.17460
s : Set (CofiniteTopology α)
⊢ IsOpen s ↔ s = ∅ ∨ Set.Finite (sᶜ)
Theorem: Metric.cthickening_thickening_subset
File: Mathlib/Topology/MetricSpace/HausdorffDistance.lean

tactic: obtain hδ | hδ := le_total δ 0
state_before: ι : Sort ?u.157071
α : Type u
β : Type v
inst✝ : PseudoEMetricSpace α
δ✝ ε : ℝ
s✝ t : Set α
x : α
hε : 0 ≤ ε
δ : ℝ
s : Set α
⊢ cthickening ε (thickening δ s) ⊆ cthickening (ε + δ) s

tactic: intro x
state_before: case inr
ι : Sort ?u.157071
α : Type u
β : Type v
inst✝ : PseudoEMetricSpace α
δ✝ ε : ℝ
s✝ t : Set α
x : α
hε : 0 ≤ ε
δ : ℝ
s : Set α
hδ : 0 ≤ δ
⊢ cthickening ε (thickening δ s) ⊆ cthickening (ε + δ) s

tactic: simp_rw [mem_cthickening_iff, ENNReal.ofReal_add hε hδ]
state_before: case inr
ι : Sort ?u.157071
α : Type u
β : Type v
inst✝ : PseudoEMetricSpace α
δ✝ ε : ℝ
s✝ t : Set α
x✝ : α
hε : 0 ≤ ε
δ : ℝ
s : Set α
hδ : 0 ≤ δ
x : α
⊢ x ∈ cthickening ε (thickening δ s) → x ∈ cthickening (ε + δ) s

tactic: exact fun hx => infEdist_le_infEdist_thickening_add.trans (add_le_add_right hx _)
state_before: case inr
ι : Sort ?u.157071
α : Type u
β : Type v
inst✝ : PseudoEMetricSpace α
δ✝ ε : ℝ
s✝ t : Set α
x✝ : α
hε : 0 ≤ ε
δ : ℝ
s : Set α
hδ : 0 ≤ δ
x : α
⊢ infEdist x (thickening δ s) ≤ ENNReal.ofReal ε → infEdist x s ≤ ENNReal.ofReal ε + ENNReal.ofReal δ

tactic: simp only [thickening_of_nonpos hδ, cthickening_empty, empty_subset]
state_before: case inl
ι : Sort ?u.157071
α : Type u
β : Type v
inst✝ : PseudoEMetricSpace α
δ✝ ε : ℝ
s✝ t : Set α
x : α
hε : 0 ≤ ε
δ : ℝ
s : Set α
hδ : δ ≤ 0
⊢ cthickening ε (thickening δ s) ⊆ cthickening (ε + δ) s
Theorem: Int.lt_of_add_lt_add_right
File: Std/Data/Int/Lemmas.lean

tactic: rwa [Int.add_comm b a, Int.add_comm b c]
state_before: a b c : Int
h : a + b < c + b
⊢ b + a < b + c
Theorem: Array.get?_push_eq
File: Std/Data/Array/Lemmas.lean

tactic: rw [getElem?_pos, get_push_eq]
state_before: α : Type u_1
a : Array α
x : α
⊢ (push a x)[size a]? = some x
Theorem: List.Chain'.sublist
File: Mathlib/Data/List/Chain.lean

tactic: rw [chain'_iff_pairwise] at hl⊢
state_before: α : Type u
β : Type v
R r : α → α → Prop
l l₁ l₂ : List α
a b : α
inst✝ : IsTrans α R
hl : Chain' R l₂
h : l₁ <+ l₂
⊢ Chain' R l₁

tactic: exact hl.sublist h
state_before: α : Type u
β : Type v
R r : α → α → Prop
l l₁ l₂ : List α
a b : α
inst✝ : IsTrans α R
hl : Pairwise R l₂
h : l₁ <+ l₂
⊢ Pairwise R l₁
Theorem: Fin.mul_zero
File: Mathlib/Data/Fin/Basic.lean

tactic: simp [eq_iff_veq, mul_def]
state_before: n m : ℕ
inst✝ : NeZero n
k : Fin n
⊢ k * 0 = 0
Theorem: Finset.replicate_mem_sym
File: Mathlib/Data/Finset/Sym.lean

tactic: rwa [(Sym.mem_replicate.1 hb).2]
state_before: α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
a b✝ : α
n✝ : ℕ
m : Sym α n✝
ha : a ∈ s
n : ℕ
b : α
hb : b ∈ Sym.replicate n a
⊢ b ∈ s
Theorem: AbstractCompletion.extend_unique
File: Mathlib/Topology/UniformSpace/AbstractCompletion.lean

tactic: apply pkg.funext pkg.continuous_extend hg.continuous
state_before: α : Type u_1
inst✝³ : UniformSpace α
pkg : AbstractCompletion α
β : Type u_2
inst✝² : UniformSpace β
f : α → β
inst✝¹ : CompleteSpace β
inst✝ : SeparatedSpace β
hf : UniformContinuous f
g : pkg.space → β
hg : UniformContinuous g
h : ∀ (a : α), f a = g (coe pkg a)
⊢ AbstractCompletion.extend pkg f = g

tactic: simpa only [pkg.extend_coe hf] using h
state_before: α : Type u_1
inst✝³ : UniformSpace α
pkg : AbstractCompletion α
β : Type u_2
inst✝² : UniformSpace β
f : α → β
inst✝¹ : CompleteSpace β
inst✝ : SeparatedSpace β
hf : UniformContinuous f
g : pkg.space → β
hg : UniformContinuous g
h : ∀ (a : α), f a = g (coe pkg a)
⊢ ∀ (a : α), AbstractCompletion.extend pkg f (coe pkg a) = g (coe pkg a)
Theorem: OmegaCompletePartialOrder.continuous_id
File: Mathlib/Order/OmegaCompletePartialOrder.lean

tactic: intro c
state_before: α : Type u
β : Type v
γ : Type ?u.11276
inst✝² : OmegaCompletePartialOrder α
inst✝¹ : OmegaCompletePartialOrder β
inst✝ : OmegaCompletePartialOrder γ
f : α →o β
g : β →o γ
⊢ Continuous OrderHom.id

tactic: rw [c.map_id]
state_before: α : Type u
β : Type v
γ : Type ?u.11276
inst✝² : OmegaCompletePartialOrder α
inst✝¹ : OmegaCompletePartialOrder β
inst✝ : OmegaCompletePartialOrder γ
f : α →o β
g : β →o γ
c : Chain α
⊢ ↑OrderHom.id (ωSup c) = ωSup (map c OrderHom.id)

tactic: rfl
state_before: α : Type u
β : Type v
γ : Type ?u.11276
inst✝² : OmegaCompletePartialOrder α
inst✝¹ : OmegaCompletePartialOrder β
inst✝ : OmegaCompletePartialOrder γ
f : α →o β
g : β →o γ
c : Chain α
⊢ ↑OrderHom.id (ωSup c) = ωSup c
Theorem: Finset.image₂_congr
File: Mathlib/Data/Finset/NAry.lean

tactic: push_cast
state_before: α : Type u_1
α' : Type ?u.45879
β : Type u_2
β' : Type ?u.45885
γ : Type u_3
γ' : Type ?u.45891
δ : Type ?u.45894
δ' : Type ?u.45897
ε : Type ?u.45900
ε' : Type ?u.45903
ζ : Type ?u.45906
ζ' : Type ?u.45909
ν : Type ?u.45912
inst✝⁷ : DecidableEq α'
inst✝⁶ : DecidableEq β'
inst✝⁵ : DecidableEq γ
inst✝⁴ : DecidableEq γ'
inst✝³ : DecidableEq δ
inst✝² : DecidableEq δ'
inst✝¹ : DecidableEq ε
inst✝ : DecidableEq ε'
f f' : α → β → γ
g g' : α → β → γ → δ
s s' : Finset α
t t' : Finset β
u u' : Finset γ
a a' : α
b b' : β
c : γ
h : ∀ (a : α), a ∈ s → ∀ (b : β), b ∈ t → f a b = f' a b
⊢ ↑(image₂ f s t) = ↑(image₂ f' s t)

tactic: exact image2_congr h
state_before: α : Type u_1
α' : Type ?u.45879
β : Type u_2
β' : Type ?u.45885
γ : Type u_3
γ' : Type ?u.45891
δ : Type ?u.45894
δ' : Type ?u.45897
ε : Type ?u.45900
ε' : Type ?u.45903
ζ : Type ?u.45906
ζ' : Type ?u.45909
ν : Type ?u.45912
inst✝⁷ : DecidableEq α'
inst✝⁶ : DecidableEq β'
inst✝⁵ : DecidableEq γ
inst✝⁴ : DecidableEq γ'
inst✝³ : DecidableEq δ
inst✝² : DecidableEq δ'
inst✝¹ : DecidableEq ε
inst✝ : DecidableEq ε'
f f' : α → β → γ
g g' : α → β → γ → δ
s s' : Finset α
t t' : Finset β
u u' : Finset γ
a a' : α
b b' : β
c : γ
h : ∀ (a : α), a ∈ s → ∀ (b : β), b ∈ t → f a b = f' a b
⊢ image2 f ↑s ↑t = image2 f' ↑s ↑t
Theorem: HasStrictDerivAt.complexToReal_fderiv'
File: Mathlib/Analysis/Complex/RealDeriv.lean

tactic: simpa only [Complex.restrictScalars_one_smulRight'] using
  h.hasStrictFDerivAt.restrictScalars ℝ
state_before: e : ℂ → ℂ
e' : ℂ
z : ℝ
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℂ E
f : ℂ → E
x : ℂ
f' : E
h : HasStrictDerivAt f f' x
⊢ HasStrictFDerivAt f (ContinuousLinearMap.smulRight reClm f' + I • ContinuousLinearMap.smulRight imClm f') x
Theorem: List.nextOr_concat
File: Mathlib/Data/List/Cycle.lean

tactic: induction' xs with z zs IH
state_before: α : Type u_1
inst✝ : DecidableEq α
xs : List α
x d : α
h : ¬x ∈ xs
⊢ nextOr (xs ++ [x]) x d = d

tactic: simp
state_before: case nil
α : Type u_1
inst✝ : DecidableEq α
xs : List α
x d : α
h✝ : ¬x ∈ xs
h : ¬x ∈ []
⊢ nextOr ([] ++ [x]) x d = d

tactic: obtain ⟨hz, hzs⟩ := not_or.mp (mt mem_cons.2 h)
state_before: case cons
α : Type u_1
inst✝ : DecidableEq α
xs : List α
x d : α
h✝ : ¬x ∈ xs
z : α
zs : List α
IH : ¬x ∈ zs → nextOr (zs ++ [x]) x d = d
h : ¬x ∈ z :: zs
⊢ nextOr (z :: zs ++ [x]) x d = d

tactic: rw [cons_append, nextOr_cons_of_ne _ _ _ _ hz, IH hzs]
state_before: case cons.intro
α : Type u_1
inst✝ : DecidableEq α
xs : List α
x d : α
h✝ : ¬x ∈ xs
z : α
zs : List α
IH : ¬x ∈ zs → nextOr (zs ++ [x]) x d = d
h : ¬x ∈ z :: zs
hz : ¬x = z
hzs : ¬x ∈ zs
⊢ nextOr (z :: zs ++ [x]) x d = d
Theorem: Real.logb_zero
File: Mathlib/Analysis/SpecialFunctions/Log/Base.lean

tactic: simp [logb]
state_before: b x y : ℝ
⊢ logb b 0 = 0
Theorem: Polynomial.natDegree_mul_mirror
File: Mathlib/Data/Polynomial/Mirror.lean

tactic: by_cases hp : p = 0
state_before: R : Type u_1
inst✝¹ : Semiring R
p q : R[X]
inst✝ : NoZeroDivisors R
⊢ natDegree (p * mirror p) = 2 * natDegree p

tactic: rw [natDegree_mul hp (mt mirror_eq_zero.mp hp), mirror_natDegree, two_mul]
state_before: case neg
R : Type u_1
inst✝¹ : Semiring R
p q : R[X]
inst✝ : NoZeroDivisors R
hp : ¬p = 0
⊢ natDegree (p * mirror p) = 2 * natDegree p

tactic: rw [hp, MulZeroClass.zero_mul, natDegree_zero, MulZeroClass.mul_zero]
state_before: case pos
R : Type u_1
inst✝¹ : Semiring R
p q : R[X]
inst✝ : NoZeroDivisors R
hp : p = 0
⊢ natDegree (p * mirror p) = 2 * natDegree p
Theorem: LinearMap.equivariantProjection_condition
File: Mathlib/RepresentationTheory/Maschke.lean

tactic: rw [equivariantProjection_apply]
state_before: k : Type u
inst✝¹¹ : CommRing k
G : Type u
inst✝¹⁰ : Group G
V : Type v
inst✝⁹ : AddCommGroup V
inst✝⁸ : Module k V
inst✝⁷ : Module (MonoidAlgebra k G) V
inst✝⁶ : IsScalarTower k (MonoidAlgebra k G) V
W : Type w
inst✝⁵ : AddCommGroup W
inst✝⁴ : Module k W
inst✝³ : Module (MonoidAlgebra k G) W
inst✝² : IsScalarTower k (MonoidAlgebra k G) W
π : W →ₗ[k] V
i : V →ₗ[MonoidAlgebra k G] W
h : ∀ (v : V), ↑π (↑i v) = v
inst✝¹ : Fintype G
inst✝ : Invertible ↑(Fintype.card G)
v : V
⊢ ↑(equivariantProjection G π) (↑i v) = v

tactic: simp only [conjugate_i π i h]
state_before: k : Type u
inst✝¹¹ : CommRing k
G : Type u
inst✝¹⁰ : Group G
V : Type v
inst✝⁹ : AddCommGroup V
inst✝⁸ : Module k V
inst✝⁷ : Module (MonoidAlgebra k G) V
inst✝⁶ : IsScalarTower k (MonoidAlgebra k G) V
W : Type w
inst✝⁵ : AddCommGroup W
inst✝⁴ : Module k W
inst✝³ : Module (MonoidAlgebra k G) W
inst✝² : IsScalarTower k (MonoidAlgebra k G) W
π : W →ₗ[k] V
i : V →ₗ[MonoidAlgebra k G] W
h : ∀ (v : V), ↑π (↑i v) = v
inst✝¹ : Fintype G
inst✝ : Invertible ↑(Fintype.card G)
v : V
⊢ ⅟↑(Fintype.card G) • ∑ g : G, ↑(conjugate π g) (↑i v) = v

tactic: rw [Finset.sum_const, Finset.card_univ, nsmul_eq_smul_cast k, smul_smul,
  Invertible.invOf_mul_self, one_smul]
state_before: k : Type u
inst✝¹¹ : CommRing k
G : Type u
inst✝¹⁰ : Group G
V : Type v
inst✝⁹ : AddCommGroup V
inst✝⁸ : Module k V
inst✝⁷ : Module (MonoidAlgebra k G) V
inst✝⁶ : IsScalarTower k (MonoidAlgebra k G) V
W : Type w
inst✝⁵ : AddCommGroup W
inst✝⁴ : Module k W
inst✝³ : Module (MonoidAlgebra k G) W
inst✝² : IsScalarTower k (MonoidAlgebra k G) W
π : W →ₗ[k] V
i : V →ₗ[MonoidAlgebra k G] W
h : ∀ (v : V), ↑π (↑i v) = v
inst✝¹ : Fintype G
inst✝ : Invertible ↑(Fintype.card G)
v : V
⊢ ⅟↑(Fintype.card G) • ∑ x : G, v = v
Theorem: ContinuousLinearMap.exists_nonlinearRightInverse_of_surjective
File: Mathlib/Analysis/NormedSpace/Banach.lean

tactic: choose C hC fsymm h using exists_preimage_norm_le _ (LinearMap.range_eq_top.mp hsurj)
state_before: 𝕜 : Type u_1
inst✝⁶ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
F : Type u_3
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
f✝ : E →L[𝕜] F
inst✝¹ : CompleteSpace F
inst✝ : CompleteSpace E
f : E →L[𝕜] F
hsurj : LinearMap.range f = ⊤
⊢ ∃ fsymm, 0 < fsymm.nnnorm

tactic: use {
    toFun := fsymm
    nnnorm := ⟨C, hC.lt.le⟩
    bound' := fun y => (h y).2
    right_inv' := fun y => (h y).1 }
state_before: 𝕜 : Type u_1
inst✝⁶ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
F : Type u_3
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
f✝ : E →L[𝕜] F
inst✝¹ : CompleteSpace F
inst✝ : CompleteSpace E
f : E →L[𝕜] F
hsurj : LinearMap.range f = ⊤
C : ℝ
hC : C > 0
fsymm : F → E
h : ∀ (y : F), ↑f (fsymm y) = y ∧ ‖fsymm y‖ ≤ C * ‖y‖
⊢ ∃ fsymm, 0 < fsymm.nnnorm

tactic: exact hC
state_before: 𝕜 : Type u_1
inst✝⁶ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
F : Type u_3
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
f✝ : E →L[𝕜] F
inst✝¹ : CompleteSpace F
inst✝ : CompleteSpace E
f : E →L[𝕜] F
hsurj : LinearMap.range f = ⊤
C : ℝ
hC : C > 0
fsymm : F → E
h : ∀ (y : F), ↑f (fsymm y) = y ∧ ‖fsymm y‖ ≤ C * ‖y‖
⊢ 0 <
    { toFun := fsymm, nnnorm := { val := C, property := (_ : 0 ≤ C) }, bound' := (_ : ∀ (y : F), ‖fsymm y‖ ≤ C * ‖y‖),
        right_inv' := (_ : ∀ (y : F), ↑f (fsymm y) = y) }.nnnorm
Theorem: List.getLast_eq_getLastD
File: Std/Data/List/Lemmas.lean

tactic: cases l <;> rfl
state_before: α : Type u_1
a : α
l : List α
h : a :: l ≠ []
⊢ getLast (a :: l) h = getLastD l a
Theorem: norm_midpoint_lt_iff
File: Mathlib/Analysis/Convex/StrictConvexSpace.lean

tactic: rw [norm_smul, Real.norm_of_nonneg (one_div_nonneg.2 zero_le_two), ← inv_eq_one_div, ←
  div_eq_inv_mul, div_lt_iff (zero_lt_two' ℝ), mul_two, ← not_sameRay_iff_of_norm_eq h,
  not_sameRay_iff_norm_add_lt, h]
state_before: 𝕜 : Type ?u.79698
E : Type u_1
inst✝⁴ : NormedLinearOrderedField 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
inst✝¹ : NormedSpace ℝ E
inst✝ : StrictConvexSpace ℝ E
x y z : E
a b r : ℝ
h : ‖x‖ = ‖y‖
⊢ ‖(1 / 2) • (x + y)‖ < ‖x‖ ↔ x ≠ y
Theorem: BilinForm.compRight_id
File: Mathlib/LinearAlgebra/BilinearForm.lean

tactic: ext
state_before: R : Type u_1
M : Type u_2
inst✝¹⁶ : Semiring R
inst✝¹⁵ : AddCommMonoid M
inst✝¹⁴ : Module R M
R₁ : Type ?u.516867
M₁ : Type ?u.516870
inst✝¹³ : Ring R₁
inst✝¹² : AddCommGroup M₁
inst✝¹¹ : Module R₁ M₁
R₂ : Type ?u.517479
M₂ : Type ?u.517482
inst✝¹⁰ : CommSemiring R₂
inst✝⁹ : AddCommMonoid M₂
inst✝⁸ : Module R₂ M₂
R₃ : Type ?u.517669
M₃ : Type ?u.517672
inst✝⁷ : CommRing R₃
inst✝⁶ : AddCommGroup M₃
inst✝⁵ : Module R₃ M₃
V : Type ?u.518260
K : Type ?u.518263
inst✝⁴ : Field K
inst✝³ : AddCommGroup V
inst✝² : Module K V
B✝ : BilinForm R M
B₁ : BilinForm R₁ M₁
B₂ : BilinForm R₂ M₂
M' : Type w
inst✝¹ : AddCommMonoid M'
inst✝ : Module R M'
B : BilinForm R M
⊢ compRight B LinearMap.id = B

tactic: rfl
state_before: case H
R : Type u_1
M : Type u_2
inst✝¹⁶ : Semiring R
inst✝¹⁵ : AddCommMonoid M
inst✝¹⁴ : Module R M
R₁ : Type ?u.516867
M₁ : Type ?u.516870
inst✝¹³ : Ring R₁
inst✝¹² : AddCommGroup M₁
inst✝¹¹ : Module R₁ M₁
R₂ : Type ?u.517479
M₂ : Type ?u.517482
inst✝¹⁰ : CommSemiring R₂
inst✝⁹ : AddCommMonoid M₂
inst✝⁸ : Module R₂ M₂
R₃ : Type ?u.517669
M₃ : Type ?u.517672
inst✝⁷ : CommRing R₃
inst✝⁶ : AddCommGroup M₃
inst✝⁵ : Module R₃ M₃
V : Type ?u.518260
K : Type ?u.518263
inst✝⁴ : Field K
inst✝³ : AddCommGroup V
inst✝² : Module K V
B✝ : BilinForm R M
B₁ : BilinForm R₁ M₁
B₂ : BilinForm R₂ M₂
M' : Type w
inst✝¹ : AddCommMonoid M'
inst✝ : Module R M'
B : BilinForm R M
x✝ y✝ : M
⊢ bilin (compRight B LinearMap.id) x✝ y✝ = bilin B x✝ y✝
Theorem: Filter.tendstoIxxClass_inf
File: Mathlib/Order/Filter/Interval.lean

tactic: simpa only [prod_inf_prod, smallSets_inf] using h.1.inf h'.1
state_before: α : Type u_1
β : Type ?u.6755
inst✝ : Preorder α
l₁ l₁' l₂ l₂' : Filter α
Ixx : α → α → Set α
h : TendstoIxxClass Ixx l₁ l₂
h' : TendstoIxxClass Ixx l₁' l₂'
⊢ Tendsto (fun p => Ixx p.fst p.snd) ((l₁ ⊓ l₁') ×ˢ (l₁ ⊓ l₁')) (smallSets (l₂ ⊓ l₂'))