tasksource/leandojo huggingface dataset:
Theorem: IntermediateField.adjoin_map
File: Mathlib/FieldTheory/Adjoin.lean

tactic: ext x
state_before: F : Type u_2
inst✝⁴ : Field F
E : Type u_3
inst✝³ : Field E
inst✝² : Algebra F E
S : Set E
E' : Type u_1
inst✝¹ : Field E'
inst✝ : Algebra F E'
f : E →ₐ[F] E'
⊢ map f (adjoin F S) = adjoin F (↑f '' S)

tactic: show
  x ∈ (Subfield.closure (Set.range (algebraMap F E) ∪ S)).map (f : E →+* E') ↔
    x ∈ Subfield.closure (Set.range (algebraMap F E') ∪ f '' S)
state_before: case h
F : Type u_2
inst✝⁴ : Field F
E : Type u_3
inst✝³ : Field E
inst✝² : Algebra F E
S : Set E
E' : Type u_1
inst✝¹ : Field E'
inst✝ : Algebra F E'
f : E →ₐ[F] E'
x : E'
⊢ x ∈ map f (adjoin F S) ↔ x ∈ adjoin F (↑f '' S)

tactic: rw [RingHom.map_field_closure, Set.image_union, ← Set.range_comp, ← RingHom.coe_comp,
  f.comp_algebraMap]
state_before: case h
F : Type u_2
inst✝⁴ : Field F
E : Type u_3
inst✝³ : Field E
inst✝² : Algebra F E
S : Set E
E' : Type u_1
inst✝¹ : Field E'
inst✝ : Algebra F E'
f : E →ₐ[F] E'
x : E'
⊢ x ∈ Subfield.map (↑f) (Subfield.closure (Set.range ↑(algebraMap F E) ∪ S)) ↔
    x ∈ Subfield.closure (Set.range ↑(algebraMap F E') ∪ ↑f '' S)

tactic: rfl
state_before: case h
F : Type u_2
inst✝⁴ : Field F
E : Type u_3
inst✝³ : Field E
inst✝² : Algebra F E
S : Set E
E' : Type u_1
inst✝¹ : Field E'
inst✝ : Algebra F E'
f : E →ₐ[F] E'
x : E'
⊢ x ∈ Subfield.closure (Set.range ↑(algebraMap F E') ∪ ↑↑f '' S) ↔
    x ∈ Subfield.closure (Set.range ↑(algebraMap F E') ∪ ↑f '' S)
Theorem: Submodule.span_insert
File: Mathlib/LinearAlgebra/Span.lean

tactic: rw [insert_eq, span_union]
state_before: R : Type u_2
R₂ : Type ?u.171174
K : Type ?u.171177
M : Type u_1
M₂ : Type ?u.171183
V : Type ?u.171186
S : Type ?u.171189
inst✝⁵ : Semiring R
inst✝⁴ : AddCommMonoid M
inst✝³ : Module R M
x✝ : M
p p' : Submodule R M
inst✝² : Semiring R₂
σ₁₂ : R →+* R₂
inst✝¹ : AddCommMonoid M₂
inst✝ : Module R₂ M₂
s✝ t : Set M
x : M
s : Set M
⊢ span R (insert x s) = span R {x} ⊔ span R s
Theorem: MvPFunctor.wRec_eq
File: Mathlib/Data/PFunctor/Multivariate/W.lean

tactic: rw [wMk, wRec]
state_before: n : ℕ
P : MvPFunctor (n + 1)
α : TypeVec n
C : Type u_1
g : (a : P.A) → B (drop P) a ⟹ α → (PFunctor.B (last P) a → W P α) → (PFunctor.B (last P) a → C) → C
a : P.A
f' : B (drop P) a ⟹ α
f : PFunctor.B (last P) a → W P α
⊢ wRec P g (wMk P a f' f) = g a f' f fun i => wRec P g (f i)

tactic: dsimp
state_before: n : ℕ
P : MvPFunctor (n + 1)
α : TypeVec n
C : Type u_1
g : (a : P.A) → B (drop P) a ⟹ α → (PFunctor.B (last P) a → W P α) → (PFunctor.B (last P) a → C) → C
a : P.A
f' : B (drop P) a ⟹ α
f : PFunctor.B (last P) a → W P α
⊢ (match
      let g := fun i => (f i).fst;
      let g' := wPathCasesOn P f' fun i => (f i).snd;
      { fst := WType.mk a g, snd := g' } with
    | { fst := a, snd := f' } =>
      let g' := fun a f h h' => g a (wPathDestLeft P h) (fun i => { fst := f i, snd := wPathDestRight P h i }) h';
      wpRec P g' a f') =
    g a f' f fun i => wRec P g (f i)

tactic: rw [wpRec_eq]
state_before: n : ℕ
P : MvPFunctor (n + 1)
α : TypeVec n
C : Type u_1
g : (a : P.A) → B (drop P) a ⟹ α → (PFunctor.B (last P) a → W P α) → (PFunctor.B (last P) a → C) → C
a : P.A
f' : B (drop P) a ⟹ α
f : PFunctor.B (last P) a → W P α
⊢ wpRec P (fun a f h h' => g a (wPathDestLeft P h) (fun i => { fst := f i, snd := wPathDestRight P h i }) h')
      (WType.mk a fun i => (f i).fst) (wPathCasesOn P f' fun i => (f i).snd) =
    g a f' f fun i => wRec P g (f i)

tactic: dsimp only [wPathDestLeft_wPathCasesOn, wPathDestRight_wPathCasesOn]
state_before: n : ℕ
P : MvPFunctor (n + 1)
α : TypeVec n
C : Type u_1
g : (a : P.A) → B (drop P) a ⟹ α → (PFunctor.B (last P) a → W P α) → (PFunctor.B (last P) a → C) → C
a : P.A
f' : B (drop P) a ⟹ α
f : PFunctor.B (last P) a → W P α
⊢ (g a (wPathDestLeft P (wPathCasesOn P f' fun i => (f i).snd))
      (fun i => { fst := (f i).fst, snd := wPathDestRight P (wPathCasesOn P f' fun i => (f i).snd) i }) fun i =>
      wpRec P (fun a f h h' => g a (wPathDestLeft P h) (fun i => { fst := f i, snd := wPathDestRight P h i }) h')
        (f i).fst (wPathDestRight P (wPathCasesOn P f' fun i => (f i).snd) i)) =
    g a f' f fun i => wRec P g (f i)

tactic: congr
state_before: n : ℕ
P : MvPFunctor (n + 1)
α : TypeVec n
C : Type u_1
g : (a : P.A) → B (drop P) a ⟹ α → (PFunctor.B (last P) a → W P α) → (PFunctor.B (last P) a → C) → C
a : P.A
f' : B (drop P) a ⟹ α
f : PFunctor.B (last P) a → W P α
⊢ (g a f' (fun i => { fst := (f i).fst, snd := (f i).snd }) fun i =>
      wpRec P (fun a f h h' => g a (wPathDestLeft P h) (fun i => { fst := f i, snd := wPathDestRight P h i }) h')
        (f i).fst (f i).snd) =
    g a f' f fun i => wRec P g (f i)
Theorem: Stream'.cons_nth_inits_core
File: Mathlib/Data/Stream/Init.lean

tactic: intro a n
state_before: α : Type u
β : Type v
δ : Type w
⊢ ∀ (a : α) (n : ℕ) (l : List α) (s : Stream' α), a :: nth (initsCore l s) n = nth (initsCore (a :: l) s) n

tactic: induction' n with n' ih
state_before: α : Type u
β : Type v
δ : Type w
a : α
n : ℕ
⊢ ∀ (l : List α) (s : Stream' α), a :: nth (initsCore l s) n = nth (initsCore (a :: l) s) n

tactic: intros
state_before: case zero
α : Type u
β : Type v
δ : Type w
a : α
⊢ ∀ (l : List α) (s : Stream' α), a :: nth (initsCore l s) zero = nth (initsCore (a :: l) s) zero

tactic: rfl
state_before: case zero
α : Type u
β : Type v
δ : Type w
a : α
l✝ : List α
s✝ : Stream' α
⊢ a :: nth (initsCore l✝ s✝) zero = nth (initsCore (a :: l✝) s✝) zero

tactic: intro l s
state_before: case succ
α : Type u
β : Type v
δ : Type w
a : α
n' : ℕ
ih : ∀ (l : List α) (s : Stream' α), a :: nth (initsCore l s) n' = nth (initsCore (a :: l) s) n'
⊢ ∀ (l : List α) (s : Stream' α), a :: nth (initsCore l s) (succ n') = nth (initsCore (a :: l) s) (succ n')

tactic: rw [nth_succ, inits_core_eq, tail_cons, ih, inits_core_eq (a::l) s]
state_before: case succ
α : Type u
β : Type v
δ : Type w
a : α
n' : ℕ
ih : ∀ (l : List α) (s : Stream' α), a :: nth (initsCore l s) n' = nth (initsCore (a :: l) s) n'
l : List α
s : Stream' α
⊢ a :: nth (initsCore l s) (succ n') = nth (initsCore (a :: l) s) (succ n')

tactic: rfl
state_before: case succ
α : Type u
β : Type v
δ : Type w
a : α
n' : ℕ
ih : ∀ (l : List α) (s : Stream' α), a :: nth (initsCore l s) n' = nth (initsCore (a :: l) s) n'
l : List α
s : Stream' α
⊢ nth (initsCore (a :: (l ++ [head s])) (tail s)) n' =
    nth ((a :: l) :: initsCore (a :: l ++ [head s]) (tail s)) (succ n')
Theorem: LieIdeal.derivedSeries_map_le
File: Mathlib/Algebra/Lie/Solvable.lean

tactic: induction' k with k ih
state_before: R : Type u
L : Type v
M : Type w
L' : Type w₁
inst✝⁴ : CommRing R
inst✝³ : LieRing L
inst✝² : LieAlgebra R L
inst✝¹ : LieRing L'
inst✝ : LieAlgebra R L'
I J : LieIdeal R L
f : L' →ₗ⁅R⁆ L
k : ℕ
⊢ map f (derivedSeries R L' k) ≤ derivedSeries R L k

tactic: simp only [Nat.zero_eq, derivedSeries_def, derivedSeriesOfIdeal_zero, le_top]
state_before: case zero
R : Type u
L : Type v
M : Type w
L' : Type w₁
inst✝⁴ : CommRing R
inst✝³ : LieRing L
inst✝² : LieAlgebra R L
inst✝¹ : LieRing L'
inst✝ : LieAlgebra R L'
I J : LieIdeal R L
f : L' →ₗ⁅R⁆ L
⊢ map f (derivedSeries R L' Nat.zero) ≤ derivedSeries R L Nat.zero

tactic: simp only [derivedSeries_def, derivedSeriesOfIdeal_succ] at ih ⊢
state_before: case succ
R : Type u
L : Type v
M : Type w
L' : Type w₁
inst✝⁴ : CommRing R
inst✝³ : LieRing L
inst✝² : LieAlgebra R L
inst✝¹ : LieRing L'
inst✝ : LieAlgebra R L'
I J : LieIdeal R L
f : L' →ₗ⁅R⁆ L
k : ℕ
ih : map f (derivedSeries R L' k) ≤ derivedSeries R L k
⊢ map f (derivedSeries R L' (Nat.succ k)) ≤ derivedSeries R L (Nat.succ k)

tactic: exact le_trans (map_bracket_le f) (LieSubmodule.mono_lie _ _ _ _ ih ih)
state_before: case succ
R : Type u
L : Type v
M : Type w
L' : Type w₁
inst✝⁴ : CommRing R
inst✝³ : LieRing L
inst✝² : LieAlgebra R L
inst✝¹ : LieRing L'
inst✝ : LieAlgebra R L'
I J : LieIdeal R L
f : L' →ₗ⁅R⁆ L
k : ℕ
ih : map f (derivedSeriesOfIdeal R L' k ⊤) ≤ derivedSeriesOfIdeal R L k ⊤
⊢ map f ⁅derivedSeriesOfIdeal R L' k ⊤, derivedSeriesOfIdeal R L' k ⊤⁆ ≤
    ⁅derivedSeriesOfIdeal R L k ⊤, derivedSeriesOfIdeal R L k ⊤⁆
Theorem: List.mem_map_of_involutive
File: Mathlib/Data/List/Basic.lean

tactic: rw [mem_map, hf.exists_mem_and_apply_eq_iff]
state_before: ι : Type ?u.2322
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
f : α → α
hf : Involutive f
a : α
l : List α
⊢ a ∈ map f l ↔ f a ∈ l
Theorem: Filter.ZeroAtFilter.add
File: Mathlib/Order/Filter/ZeroAndBoundedAtFilter.lean

tactic: simpa using hf.add hg
state_before: α : Type u_2
β : Type u_1
inst✝² : TopologicalSpace β
inst✝¹ : AddZeroClass β
inst✝ : ContinuousAdd β
l : Filter α
f g : α → β
hf : ZeroAtFilter l f
hg : ZeroAtFilter l g
⊢ ZeroAtFilter l (f + g)
Theorem: Nat.le_or_le_of_add_eq_add_pred
File: Mathlib/Data/Nat/Order/Basic.lean

tactic: cases' le_or_lt m k with h' h' <;> [left; right]
state_before: m n k l : ℕ
h : k + l = m + n - 1
⊢ m ≤ k ∨ n ≤ l

tactic: exact h'
state_before: case inl.h
m n k l : ℕ
h : k + l = m + n - 1
h' : m ≤ k
⊢ m ≤ k

tactic: replace h' := add_lt_add_right h' l
state_before: case inr.h
m n k l : ℕ
h : k + l = m + n - 1
h' : k < m
⊢ n ≤ l

tactic: rw [h] at h'
state_before: case inr.h
m n k l : ℕ
h : k + l = m + n - 1
h' : k + l < m + l
⊢ n ≤ l

tactic: cases' n.eq_zero_or_pos with hn hn
state_before: case inr.h
m n k l : ℕ
h : k + l = m + n - 1
h' : m + n - 1 < m + l
⊢ n ≤ l

tactic: rw [n.add_sub_assoc (Nat.succ_le_of_lt hn), add_lt_add_iff_left] at h'
state_before: case inr.h.inr
m n k l : ℕ
h : k + l = m + n - 1
h' : m + n - 1 < m + l
hn : n > 0
⊢ n ≤ l

tactic: exact Nat.le_of_pred_lt h'
state_before: case inr.h.inr
m n k l : ℕ
h : k + l = m + n - 1
h' : n - succ 0 < l
hn : n > 0
⊢ n ≤ l

tactic: rw [hn]
state_before: case inr.h.inl
m n k l : ℕ
h : k + l = m + n - 1
h' : m + n - 1 < m + l
hn : n = 0
⊢ n ≤ l

tactic: exact zero_le l
state_before: case inr.h.inl
m n k l : ℕ
h : k + l = m + n - 1
h' : m + n - 1 < m + l
hn : n = 0
⊢ 0 ≤ l
Theorem: AffineIsometry.dist_map
File: Mathlib/Analysis/NormedSpace/AffineIsometry.lean

tactic: rw [dist_eq_norm_vsub V₂, dist_eq_norm_vsub V, ← map_vsub, f.linearIsometry.norm_map]
state_before: 𝕜 : Type u_5
V : Type u_2
V₁ : Type ?u.45178
V₂ : Type u_3
V₃ : Type ?u.45184
V₄ : Type ?u.45187
P₁ : Type ?u.45190
P : Type u_4
P₂ : Type u_1
P₃ : Type ?u.45199
P₄ : Type ?u.45202
inst✝²⁰ : NormedField 𝕜
inst✝¹⁹ : SeminormedAddCommGroup V
inst✝¹⁸ : SeminormedAddCommGroup V₁
inst✝¹⁷ : SeminormedAddCommGroup V₂
inst✝¹⁶ : SeminormedAddCommGroup V₃
inst✝¹⁵ : SeminormedAddCommGroup V₄
inst✝¹⁴ : NormedSpace 𝕜 V
inst✝¹³ : NormedSpace 𝕜 V₁
inst✝¹² : NormedSpace 𝕜 V₂
inst✝¹¹ : NormedSpace 𝕜 V₃
inst✝¹⁰ : NormedSpace 𝕜 V₄
inst✝⁹ : PseudoMetricSpace P
inst✝⁸ : MetricSpace P₁
inst✝⁷ : PseudoMetricSpace P₂
inst✝⁶ : PseudoMetricSpace P₃
inst✝⁵ : PseudoMetricSpace P₄
inst✝⁴ : NormedAddTorsor V P
inst✝³ : NormedAddTorsor V₁ P₁
inst✝² : NormedAddTorsor V₂ P₂
inst✝¹ : NormedAddTorsor V₃ P₃
inst✝ : NormedAddTorsor V₄ P₄
f : P →ᵃⁱ[𝕜] P₂
f₁ : P₁ →ᵃⁱ[𝕜] P₂
x y : P
⊢ dist (↑f x) (↑f y) = dist x y
Theorem: Matrix.inv_pow'
File: Mathlib/LinearAlgebra/Matrix/ZPow.lean

tactic: induction' n with n ih
state_before: n' : Type u_1
inst✝² : DecidableEq n'
inst✝¹ : Fintype n'
R : Type u_2
inst✝ : CommRing R
A : M
n : ℕ
⊢ A⁻¹ ^ n = (A ^ n)⁻¹

tactic: simp
state_before: case zero
n' : Type u_1
inst✝² : DecidableEq n'
inst✝¹ : Fintype n'
R : Type u_2
inst✝ : CommRing R
A : M
⊢ A⁻¹ ^ Nat.zero = (A ^ Nat.zero)⁻¹

tactic: rw [pow_succ A, mul_eq_mul, mul_inv_rev, ← ih, ← mul_eq_mul, ← pow_succ']
state_before: case succ
n' : Type u_1
inst✝² : DecidableEq n'
inst✝¹ : Fintype n'
R : Type u_2
inst✝ : CommRing R
A : M
n : ℕ
ih : A⁻¹ ^ n = (A ^ n)⁻¹
⊢ A⁻¹ ^ Nat.succ n = (A ^ Nat.succ n)⁻¹
Theorem: subset_sInf_of_within
File: Mathlib/Order/CompleteLatticeIntervals.lean

tactic: simp [dif_pos h]
state_before: α : Type u_1
s : Set α
inst✝¹ : InfSet α
inst✝ : Inhabited ↑s
t : Set ↑s
h : sInf (Subtype.val '' t) ∈ s
⊢ sInf (Subtype.val '' t) = ↑(sInf t)
Theorem: Function.Semiconj.surjOn_range
File: Mathlib/Data/Set/Function.lean

tactic: rw [← image_univ]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.111695
ι : Sort ?u.111698
π : α → Type ?u.111703
fa : α → α
fb : β → β
f : α → β
g : β → γ
s t : Set α
h : Semiconj f fa fb
ha : Surjective fa
⊢ SurjOn fb (range f) (range f)

tactic: exact h.surjOn_image (ha.surjOn univ)
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.111695
ι : Sort ?u.111698
π : α → Type ?u.111703
fa : α → α
fb : β → β
f : α → β
g : β → γ
s t : Set α
h : Semiconj f fa fb
ha : Surjective fa
⊢ SurjOn fb (f '' univ) (f '' univ)
Theorem: continuousAt_iff_lower_upperSemicontinuousAt
File: Mathlib/Topology/Semicontinuous.lean

tactic: simp_rw [← continuousWithinAt_univ, ← lowerSemicontinuousWithinAt_univ_iff, ←
  upperSemicontinuousWithinAt_univ_iff, continuousWithinAt_iff_lower_upperSemicontinuousWithinAt]
state_before: α : Type u_1
inst✝⁴ : TopologicalSpace α
β : Type ?u.225648
inst✝³ : Preorder β
f✝ g : α → β
x : α
s t : Set α
y z : β
γ : Type u_2
inst✝² : LinearOrder γ
inst✝¹ : TopologicalSpace γ
inst✝ : OrderTopology γ
f : α → γ
⊢ ContinuousAt f x ↔ LowerSemicontinuousAt f x ∧ UpperSemicontinuousAt f x
Theorem: toIcoDiv_add_left
File: Mathlib/Algebra/Order/ToIntervalMod.lean

tactic: rw [add_comm, toIcoDiv_add_right]
state_before: α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
hα : Archimedean α
p : α
hp : 0 < p
a✝ b✝ c : α
n : ℤ
a b : α
⊢ toIcoDiv hp a (p + b) = toIcoDiv hp a b + 1
Theorem: List.prev_cons_cons_of_ne'
File: Mathlib/Data/List/Cycle.lean

tactic: cases l
state_before: α : Type u_1
inst✝ : DecidableEq α
l : List α
x y z : α
h : x ∈ y :: z :: l
hy : x ≠ y
hz : x = z
⊢ prev (y :: z :: l) x h = y

tactic: simp [prev, hy, hz]
state_before: case nil
α : Type u_1
inst✝ : DecidableEq α
x y z : α
hy : x ≠ y
hz : x = z
h : x ∈ [y, z]
⊢ prev [y, z] x h = y

tactic: rw [prev, dif_neg hy, if_pos hz]
state_before: case cons
α : Type u_1
inst✝ : DecidableEq α
x y z : α
hy : x ≠ y
hz : x = z
head✝ : α
tail✝ : List α
h : x ∈ y :: z :: head✝ :: tail✝
⊢ prev (y :: z :: head✝ :: tail✝) x h = y
Theorem: Finset.centerMass_segment
File: Mathlib/Analysis/Convex/Combination.lean

tactic: have hw : (∑ i in s, (a * w₁ i + b * w₂ i)) = 1 := by
  simp only [mul_sum.symm, sum_add_distrib, mul_one, *]
state_before: R : Type u_2
E : Type u_3
F : Type ?u.49319
ι : Type u_1
ι' : Type ?u.49325
α : Type ?u.49328
inst✝⁷ : LinearOrderedField R
inst✝⁶ : AddCommGroup E
inst✝⁵ : AddCommGroup F
inst✝⁴ : LinearOrderedAddCommGroup α
inst✝³ : Module R E
inst✝² : Module R F
inst✝¹ : Module R α
inst✝ : OrderedSMul R α
s✝ : Set E
i j : ι
c : R
t : Finset ι
w : ι → R
z✝ : ι → E
s : Finset ι
w₁ w₂ : ι → R
z : ι → E
hw₁ : ∑ i in s, w₁ i = 1
hw₂ : ∑ i in s, w₂ i = 1
a b : R
hab : a + b = 1
⊢ a • centerMass s w₁ z + b • centerMass s w₂ z = centerMass s (fun i => a * w₁ i + b * w₂ i) z

tactic: simp only [Finset.centerMass_eq_of_sum_1, Finset.centerMass_eq_of_sum_1 _ _ hw,
  smul_sum, sum_add_distrib, add_smul, mul_smul, *]
state_before: R : Type u_2
E : Type u_3
F : Type ?u.49319
ι : Type u_1
ι' : Type ?u.49325
α : Type ?u.49328
inst✝⁷ : LinearOrderedField R
inst✝⁶ : AddCommGroup E
inst✝⁵ : AddCommGroup F
inst✝⁴ : LinearOrderedAddCommGroup α
inst✝³ : Module R E
inst✝² : Module R F
inst✝¹ : Module R α
inst✝ : OrderedSMul R α
s✝ : Set E
i j : ι
c : R
t : Finset ι
w : ι → R
z✝ : ι → E
s : Finset ι
w₁ w₂ : ι → R
z : ι → E
hw₁ : ∑ i in s, w₁ i = 1
hw₂ : ∑ i in s, w₂ i = 1
a b : R
hab : a + b = 1
hw : ∑ i in s, (a * w₁ i + b * w₂ i) = 1
⊢ a • centerMass s w₁ z + b • centerMass s w₂ z = centerMass s (fun i => a * w₁ i + b * w₂ i) z

tactic: simp only [mul_sum.symm, sum_add_distrib, mul_one, *]
state_before: R : Type u_2
E : Type u_3
F : Type ?u.49319
ι : Type u_1
ι' : Type ?u.49325
α : Type ?u.49328
inst✝⁷ : LinearOrderedField R
inst✝⁶ : AddCommGroup E
inst✝⁵ : AddCommGroup F
inst✝⁴ : LinearOrderedAddCommGroup α
inst✝³ : Module R E
inst✝² : Module R F
inst✝¹ : Module R α
inst✝ : OrderedSMul R α
s✝ : Set E
i j : ι
c : R
t : Finset ι
w : ι → R
z✝ : ι → E
s : Finset ι
w₁ w₂ : ι → R
z : ι → E
hw₁ : ∑ i in s, w₁ i = 1
hw₂ : ∑ i in s, w₂ i = 1
a b : R
hab : a + b = 1
⊢ ∑ i in s, (a * w₁ i + b * w₂ i) = 1
Theorem: Real.cauchy_neg
File: Mathlib/Data/Real/Basic.lean

tactic: rw [neg_def]
state_before: x y : ℝ
a : Cauchy abs
⊢ (Real.neg { cauchy := a }).cauchy = -{ cauchy := a }.cauchy
Theorem: AffineSubspace.vadd_mem_iff_mem_of_mem_direction
File: Mathlib/LinearAlgebra/AffineSpace/AffineSubspace.lean

tactic: refine' ⟨fun h => _, fun h => vadd_mem_of_mem_direction hv h⟩
state_before: k : Type u_1
V : Type u_2
P : Type u_3
inst✝³ : Ring k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
s : AffineSubspace k P
v : V
hv : v ∈ direction s
p : P
⊢ v +ᵥ p ∈ s ↔ p ∈ s

tactic: convert vadd_mem_of_mem_direction (Submodule.neg_mem _ hv) h
state_before: k : Type u_1
V : Type u_2
P : Type u_3
inst✝³ : Ring k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
s : AffineSubspace k P
v : V
hv : v ∈ direction s
p : P
h : v +ᵥ p ∈ s
⊢ p ∈ s

tactic: simp
state_before: case h.e'_4
k : Type u_1
V : Type u_2
P : Type u_3
inst✝³ : Ring k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
s : AffineSubspace k P
v : V
hv : v ∈ direction s
p : P
h : v +ᵥ p ∈ s
⊢ p = -v +ᵥ (v +ᵥ p)
Theorem: List.forall₂_and_left
File: Mathlib/Data/List/Forall2.lean

tactic: simp only [forall₂_nil_left_iff, forall_prop_of_false (not_mem_nil _), imp_true_iff,
  true_and_iff]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.17871
δ : Type ?u.17874
R S : α → β → Prop
P : γ → δ → Prop
Rₐ : α → α → Prop
p : α → Prop
u : List β
⊢ Forall₂ (fun a b => p a ∧ R a b) [] u ↔ (∀ (a : α), a ∈ [] → p a) ∧ Forall₂ R [] u

tactic: simp only [forall₂_and_left l, forall₂_cons_left_iff, forall_mem_cons, and_assoc,
  @and_comm _ (p a), @and_left_comm _ (p a), exists_and_left]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.17871
δ : Type ?u.17874
R S : α → β → Prop
P : γ → δ → Prop
Rₐ : α → α → Prop
p : α → Prop
a : α
l : List α
u : List β
⊢ Forall₂ (fun a b => p a ∧ R a b) (a :: l) u ↔ (∀ (a_1 : α), a_1 ∈ a :: l → p a_1) ∧ Forall₂ R (a :: l) u

tactic: simp only [and_comm, and_assoc, and_left_comm, ← exists_and_right]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.17871
δ : Type ?u.17874
R S : α → β → Prop
P : γ → δ → Prop
Rₐ : α → α → Prop
p : α → Prop
a : α
l : List α
u : List β
⊢ (p a ∧ ∃ x, R a x ∧ (∀ (a : α), a ∈ l → p a) ∧ ∃ x_1, Forall₂ R l x_1 ∧ u = x :: x_1) ↔
    p a ∧ (∀ (a : α), a ∈ l → p a) ∧ ∃ b, R a b ∧ ∃ x, Forall₂ R l x ∧ u = b :: x
Theorem: AList.lookupFinsupp_eq_zero_iff
File: Mathlib/Data/Finsupp/AList.lean

tactic: rw [lookupFinsupp_apply, ← lookup_eq_none]
state_before: α : Type u_1
M : Type u_2
inst✝¹ : Zero M
inst✝ : DecidableEq α
l : AList fun _x => M
a : α
⊢ ↑(lookupFinsupp l) a = 0 ↔ ¬a ∈ l ∨ 0 ∈ lookup a l

tactic: cases' lookup a l with m <;> simp
state_before: α : Type u_1
M : Type u_2
inst✝¹ : Zero M
inst✝ : DecidableEq α
l : AList fun _x => M
a : α
⊢ Option.getD (lookup a l) 0 = 0 ↔ lookup a l = none ∨ 0 ∈ lookup a l
Theorem: map_rat_cast_smul
File: Mathlib/Algebra/Module/Basic.lean

tactic: rw [Rat.cast_def, Rat.cast_def, div_eq_mul_inv, div_eq_mul_inv, mul_smul, mul_smul,
  map_int_cast_smul f R S, map_inv_nat_cast_smul f R S]
state_before: α : Type ?u.208296
R✝ : Type ?u.208299
k : Type ?u.208302
S✝ : Type ?u.208305
M : Type u_1
M₂ : Type u_2
M₃ : Type ?u.208314
ι : Type ?u.208317
inst✝⁶ : AddCommGroup M
inst✝⁵ : AddCommGroup M₂
F : Type u_3
inst✝⁴ : AddMonoidHomClass F M M₂
f : F
R : Type u_4
S : Type u_5
inst✝³ : DivisionRing R
inst✝² : DivisionRing S
inst✝¹ : Module R M
inst✝ : Module S M₂
c : ℚ
x : M
⊢ ↑f (↑c • x) = ↑c • ↑f x
Theorem: List.neg_one_mem_of_prod_eq_neg_one
File: Mathlib/Data/List/BigOperators/Lemmas.lean

tactic: obtain ⟨x, h₁, h₂⟩ := exists_mem_ne_one_of_prod_ne_one (ne_of_eq_of_ne h (by decide))
state_before: ι : Type ?u.8005
α : Type ?u.8008
M : Type ?u.8011
N : Type ?u.8014
P : Type ?u.8017
M₀ : Type ?u.8020
G : Type ?u.8023
R : Type ?u.8026
l : List ℤ
h : prod l = -1
⊢ -1 ∈ l

tactic: exact
  Or.resolve_left
      (Int.isUnit_iff.mp
        (prod_isUnit_iff.mp (h.symm ▸ IsUnit.neg isUnit_one : IsUnit l.prod) x h₁))
      h₂ ▸
    h₁
state_before: case intro.intro
ι : Type ?u.8005
α : Type ?u.8008
M : Type ?u.8011
N : Type ?u.8014
P : Type ?u.8017
M₀ : Type ?u.8020
G : Type ?u.8023
R : Type ?u.8026
l : List ℤ
h : prod l = -1
x : ℤ
h₁ : x ∈ l
h₂ : x ≠ 1
⊢ -1 ∈ l

tactic: decide
state_before: ι : Type ?u.8005
α : Type ?u.8008
M : Type ?u.8011
N : Type ?u.8014
P : Type ?u.8017
M₀ : Type ?u.8020
G : Type ?u.8023
R : Type ?u.8026
l : List ℤ
h : prod l = -1
⊢ -1 ≠ 1
Theorem: Geometry.SimplicialComplex.disjoint_or_exists_inter_eq_convexHull
File: Mathlib/Analysis/Convex/SimplicialComplex/Basic.lean

tactic: by_contra' h
state_before: 𝕜 : Type u_2
E : Type u_1
ι : Type ?u.25492
inst✝² : OrderedRing 𝕜
inst✝¹ : AddCommGroup E
inst✝ : Module 𝕜 E
K : SimplicialComplex 𝕜 E
s t : Finset E
x : E
hs : s ∈ K.faces
ht : t ∈ K.faces
⊢ Disjoint (↑(convexHull 𝕜).toOrderHom ↑s) (↑(convexHull 𝕜).toOrderHom ↑t) ∨
    ∃ u, u ∈ K.faces ∧ ↑(convexHull 𝕜).toOrderHom ↑s ∩ ↑(convexHull 𝕜).toOrderHom ↑t = ↑(convexHull 𝕜).toOrderHom ↑u

tactic: refine' h.2 (s ∩ t) (K.down_closed hs (inter_subset_left _ _) fun hst => h.1 <|
  disjoint_iff_inf_le.mpr <| (K.inter_subset_convexHull hs ht).trans _) _
state_before: 𝕜 : Type u_2
E : Type u_1
ι : Type ?u.25492
inst✝² : OrderedRing 𝕜
inst✝¹ : AddCommGroup E
inst✝ : Module 𝕜 E
K : SimplicialComplex 𝕜 E
s t : Finset E
x : E
hs : s ∈ K.faces
ht : t ∈ K.faces
h :
  ¬Disjoint (↑(convexHull 𝕜).toOrderHom ↑s) (↑(convexHull 𝕜).toOrderHom ↑t) ∧
    ∀ (u : Finset E),
      u ∈ K.faces → ↑(convexHull 𝕜).toOrderHom ↑s ∩ ↑(convexHull 𝕜).toOrderHom ↑t ≠ ↑(convexHull 𝕜).toOrderHom ↑u
⊢ False

tactic: rw [← coe_inter, hst, coe_empty, convexHull_empty]
state_before: case refine'_1
𝕜 : Type u_2
E : Type u_1
ι : Type ?u.25492
inst✝² : OrderedRing 𝕜
inst✝¹ : AddCommGroup E
inst✝ : Module 𝕜 E
K : SimplicialComplex 𝕜 E
s t : Finset E
x : E
hs : s ∈ K.faces
ht : t ∈ K.faces
h :
  ¬Disjoint (↑(convexHull 𝕜).toOrderHom ↑s) (↑(convexHull 𝕜).toOrderHom ↑t) ∧
    ∀ (u : Finset E),
      u ∈ K.faces → ↑(convexHull 𝕜).toOrderHom ↑s ∩ ↑(convexHull 𝕜).toOrderHom ↑t ≠ ↑(convexHull 𝕜).toOrderHom ↑u
hst : s ∩ t = ∅
⊢ ↑(convexHull 𝕜).toOrderHom (↑s ∩ ↑t) ⊆ ⊥

tactic: rfl
state_before: case refine'_1
𝕜 : Type u_2
E : Type u_1
ι : Type ?u.25492
inst✝² : OrderedRing 𝕜
inst✝¹ : AddCommGroup E
inst✝ : Module 𝕜 E
K : SimplicialComplex 𝕜 E
s t : Finset E
x : E
hs : s ∈ K.faces
ht : t ∈ K.faces
h :
  ¬Disjoint (↑(convexHull 𝕜).toOrderHom ↑s) (↑(convexHull 𝕜).toOrderHom ↑t) ∧
    ∀ (u : Finset E),
      u ∈ K.faces → ↑(convexHull 𝕜).toOrderHom ↑s ∩ ↑(convexHull 𝕜).toOrderHom ↑t ≠ ↑(convexHull 𝕜).toOrderHom ↑u
hst : s ∩ t = ∅
⊢ ∅ ⊆ ⊥

tactic: rw [coe_inter, convexHull_inter_convexHull hs ht]
state_before: case refine'_2
𝕜 : Type u_2
E : Type u_1
ι : Type ?u.25492
inst✝² : OrderedRing 𝕜
inst✝¹ : AddCommGroup E
inst✝ : Module 𝕜 E
K : SimplicialComplex 𝕜 E
s t : Finset E
x : E
hs : s ∈ K.faces
ht : t ∈ K.faces
h :
  ¬Disjoint (↑(convexHull 𝕜).toOrderHom ↑s) (↑(convexHull 𝕜).toOrderHom ↑t) ∧
    ∀ (u : Finset E),
      u ∈ K.faces → ↑(convexHull 𝕜).toOrderHom ↑s ∩ ↑(convexHull 𝕜).toOrderHom ↑t ≠ ↑(convexHull 𝕜).toOrderHom ↑u
⊢ ↑(convexHull 𝕜).toOrderHom ↑s ∩ ↑(convexHull 𝕜).toOrderHom ↑t = ↑(convexHull 𝕜).toOrderHom ↑(s ∩ t)