tasksource/leandojo huggingface dataset:
Theorem: Polynomial.adjoin_X
File: Mathlib/Data/Polynomial/AlgebraMap.lean

tactic: refine' top_unique fun p _hp => _
state_before: R : Type u
S : Type v
T : Type w
A : Type z
A' : Type ?u.422492
B' : Type ?u.422495
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.422708
inst✝¹ : Semiring B
inst✝ : Algebra R B
x : A
⊢ Algebra.adjoin R {X} = ⊤

tactic: set S := Algebra.adjoin R ({X} : Set R[X])
state_before: R : Type u
S : Type v
T : Type w
A : Type z
A' : Type ?u.422492
B' : Type ?u.422495
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.422708
inst✝¹ : Semiring B
inst✝ : Algebra R B
x : A
p : R[X]
_hp : p ∈ ⊤
⊢ p ∈ Algebra.adjoin R {X}

tactic: rw [← sum_monomial_eq p]
state_before: R : Type u
S✝ : Type v
T : Type w
A : Type z
A' : Type ?u.422492
B' : Type ?u.422495
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.422708
inst✝¹ : Semiring B
inst✝ : Algebra R B
x : A
p : R[X]
_hp : p ∈ ⊤
S : Subalgebra R R[X] := Algebra.adjoin R {X}
⊢ p ∈ S

tactic: simp only [← smul_X_eq_monomial, Sum]
state_before: R : Type u
S✝ : Type v
T : Type w
A : Type z
A' : Type ?u.422492
B' : Type ?u.422495
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.422708
inst✝¹ : Semiring B
inst✝ : Algebra R B
x : A
p : R[X]
_hp : p ∈ ⊤
S : Subalgebra R R[X] := Algebra.adjoin R {X}
⊢ (sum p fun n a => ↑(monomial n) a) ∈ S

tactic: exact S.sum_mem fun n _hn => S.smul_mem (S.pow_mem (Algebra.subset_adjoin rfl) _) _
state_before: R : Type u
S✝ : Type v
T : Type w
A : Type z
A' : Type ?u.422492
B' : Type ?u.422495
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.422708
inst✝¹ : Semiring B
inst✝ : Algebra R B
x : A
p : R[X]
_hp : p ∈ ⊤
S : Subalgebra R R[X] := Algebra.adjoin R {X}
⊢ (sum p fun n a => a • X ^ n) ∈ Algebra.adjoin R {X}
Theorem: CategoryTheory.MonoidalClosed.curry_id_eq_coev
File: Mathlib/CategoryTheory/Closed/Monoidal.lean

tactic: rw [curry_eq, (ihom A).map_id (A ⊗ _)]
state_before: C : Type u
inst✝² : Category C
inst✝¹ : MonoidalCategory C
A B X X' Y Y' Z : C
inst✝ : Closed A
⊢ curry (𝟙 (A ⊗ (𝟭 C).obj X)) = (ihom.coev A).app X

tactic: apply comp_id
state_before: C : Type u
inst✝² : Category C
inst✝¹ : MonoidalCategory C
A B X X' Y Y' Z : C
inst✝ : Closed A
⊢ (ihom.coev A).app ((𝟭 C).obj X) ≫ 𝟙 ((ihom A).obj (A ⊗ (𝟭 C).obj X)) = (ihom.coev A).app X
Theorem: Algebra.isAlgebraic_iff
File: Mathlib/RingTheory/Algebraic.lean

tactic: delta Algebra.IsAlgebraic Subalgebra.IsAlgebraic
state_before: R : Type u
A : Type v
inst✝² : CommRing R
inst✝¹ : Ring A
inst✝ : Algebra R A
⊢ IsAlgebraic R A ↔ Subalgebra.IsAlgebraic ⊤

tactic: simp only [Algebra.mem_top, forall_prop_of_true, iff_self_iff]
state_before: R : Type u
A : Type v
inst✝² : CommRing R
inst✝¹ : Ring A
inst✝ : Algebra R A
⊢ (∀ (x : A), _root_.IsAlgebraic R x) ↔ ∀ (x : A), x ∈ ⊤ → _root_.IsAlgebraic R x
Theorem: IsPGroup.card_eq_or_dvd
File: Mathlib/GroupTheory/PGroup.lean

tactic: cases fintypeOrInfinite G
state_before: p : ℕ
G : Type u_1
inst✝ : Group G
hG : IsPGroup p G
hp : Fact (Nat.Prime p)
⊢ Nat.card G = 1 ∨ p ∣ Nat.card G

tactic: obtain ⟨n, hn⟩ := iff_card.mp hG
state_before: case inl
p : ℕ
G : Type u_1
inst✝ : Group G
hG : IsPGroup p G
hp : Fact (Nat.Prime p)
val✝ : Fintype G
⊢ Nat.card G = 1 ∨ p ∣ Nat.card G

tactic: rw [Nat.card_eq_fintype_card, hn]
state_before: case inl.intro
p : ℕ
G : Type u_1
inst✝ : Group G
hG : IsPGroup p G
hp : Fact (Nat.Prime p)
val✝ : Fintype G
n : ℕ
hn : card G = p ^ n
⊢ Nat.card G = 1 ∨ p ∣ Nat.card G

tactic: cases' n with n n
state_before: case inl.intro
p : ℕ
G : Type u_1
inst✝ : Group G
hG : IsPGroup p G
hp : Fact (Nat.Prime p)
val✝ : Fintype G
n : ℕ
hn : card G = p ^ n
⊢ p ^ n = 1 ∨ p ∣ p ^ n

tactic: exact Or.inl rfl
state_before: case inl.intro.zero
p : ℕ
G : Type u_1
inst✝ : Group G
hG : IsPGroup p G
hp : Fact (Nat.Prime p)
val✝ : Fintype G
hn : card G = p ^ Nat.zero
⊢ p ^ Nat.zero = 1 ∨ p ∣ p ^ Nat.zero

tactic: exact Or.inr ⟨p ^ n, by rw [pow_succ]⟩
state_before: case inl.intro.succ
p : ℕ
G : Type u_1
inst✝ : Group G
hG : IsPGroup p G
hp : Fact (Nat.Prime p)
val✝ : Fintype G
n : ℕ
hn : card G = p ^ Nat.succ n
⊢ p ^ Nat.succ n = 1 ∨ p ∣ p ^ Nat.succ n

tactic: rw [pow_succ]
state_before: p : ℕ
G : Type u_1
inst✝ : Group G
hG : IsPGroup p G
hp : Fact (Nat.Prime p)
val✝ : Fintype G
n : ℕ
hn : card G = p ^ Nat.succ n
⊢ p ^ Nat.succ n = p * p ^ n

tactic: rw [Nat.card_eq_zero_of_infinite]
state_before: case inr
p : ℕ
G : Type u_1
inst✝ : Group G
hG : IsPGroup p G
hp : Fact (Nat.Prime p)
val✝ : Infinite G
⊢ Nat.card G = 1 ∨ p ∣ Nat.card G

tactic: exact Or.inr ⟨0, rfl⟩
state_before: case inr
p : ℕ
G : Type u_1
inst✝ : Group G
hG : IsPGroup p G
hp : Fact (Nat.Prime p)
val✝ : Infinite G
⊢ 0 = 1 ∨ p ∣ 0
Theorem: FiniteField.card_image_polynomial_eval
File: Mathlib/FieldTheory/Finite/Basic.lean

tactic: simp [Finset.ext_iff, ← mem_roots_sub_C hp]
state_before: K : Type ?u.9648
R : Type u_1
inst✝³ : CommRing R
inst✝² : IsDomain R
inst✝¹ : DecidableEq R
inst✝ : Fintype R
p : R[X]
hp : 0 < degree p
a : R
x✝ : a ∈ image (fun x => eval x p) univ
⊢ filter (fun x => eval x p = a) univ = Multiset.toFinset (roots (p - ↑C a))
Theorem: CategoryTheory.Limits.equalizer.isoSourceOfSelf_inv
File: Mathlib/CategoryTheory/Limits/Shapes/Equalizers.lean

tactic: simp
state_before: C : Type u
inst✝ : Category C
X Y : C
f g : X ⟶ Y
⊢ 𝟙 X ≫ f = 𝟙 X ≫ f

tactic: apply equalizer.hom_ext
state_before: C : Type u
inst✝ : Category C
X Y : C
f g : X ⟶ Y
⊢ (isoSourceOfSelf f).inv = lift (𝟙 X) (_ : 𝟙 X ≫ f = 𝟙 X ≫ f)

tactic: simp [equalizer.isoSourceOfSelf]
state_before: case h
C : Type u
inst✝ : Category C
X Y : C
f g : X ⟶ Y
⊢ (isoSourceOfSelf f).inv ≫ ι f f = lift (𝟙 X) (_ : 𝟙 X ≫ f = 𝟙 X ≫ f) ≫ ι f f
Theorem: lebesgue_number_lemma_of_metric_sUnion
File: Mathlib/Topology/MetricSpace/Basic.lean

tactic: rw [sUnion_eq_iUnion] at hc₂
state_before: α : Type u
β : Type v
X : Type ?u.453997
ι : Type ?u.454000
inst✝ : PseudoMetricSpace α
s : Set α
c : Set (Set α)
hs : IsCompact s
hc₁ : ∀ (t : Set α), t ∈ c → IsOpen t
hc₂ : s ⊆ ⋃₀ c
⊢ ∃ δ, δ > 0 ∧ ∀ (x : α), x ∈ s → ∃ t, t ∈ c ∧ ball x δ ⊆ t

tactic: simpa using lebesgue_number_lemma_of_metric hs (by simpa) hc₂
state_before: α : Type u
β : Type v
X : Type ?u.453997
ι : Type ?u.454000
inst✝ : PseudoMetricSpace α
s : Set α
c : Set (Set α)
hs : IsCompact s
hc₁ : ∀ (t : Set α), t ∈ c → IsOpen t
hc₂ : s ⊆ ⋃ (i : ↑c), ↑i
⊢ ∃ δ, δ > 0 ∧ ∀ (x : α), x ∈ s → ∃ t, t ∈ c ∧ ball x δ ⊆ t

tactic: simpa
state_before: α : Type u
β : Type v
X : Type ?u.453997
ι : Type ?u.454000
inst✝ : PseudoMetricSpace α
s : Set α
c : Set (Set α)
hs : IsCompact s
hc₁ : ∀ (t : Set α), t ∈ c → IsOpen t
hc₂ : s ⊆ ⋃ (i : ↑c), ↑i
⊢ ∀ (i : ↑c), IsOpen ↑i
Theorem: Vector.toList_ofFn
File: Mathlib/Data/Vector/Basic.lean

tactic: rw [ofFn, List.ofFn_succ, toList_cons, toList_ofFn]
state_before: n✝ : ℕ
α : Type u_1
n : ℕ
f : Fin (n + 1) → α
⊢ toList (ofFn f) = List.ofFn f
Theorem: Finsupp.mapRange_smul
File: Mathlib/Data/Finsupp/Basic.lean

tactic: erw [← mapRange_comp]
state_before: α : Type u_4
β : Type ?u.634340
γ : Type ?u.634343
ι : Type ?u.634346
M : Type u_2
M' : Type ?u.634352
N : Type u_3
P : Type ?u.634358
G : Type ?u.634361
H : Type ?u.634364
R : Type u_1
S : Type ?u.634370
x✝ : Monoid R
inst✝³ : AddMonoid M
inst✝² : DistribMulAction R M
inst✝¹ : AddMonoid N
inst✝ : DistribMulAction R N
f : M → N
hf : f 0 = 0
c : R
v : α →₀ M
hsmul : ∀ (x : M), f (c • x) = c • f x
⊢ mapRange f hf (c • v) = c • mapRange f hf v

tactic: simp_rw [this]
state_before: α : Type u_4
β : Type ?u.634340
γ : Type ?u.634343
ι : Type ?u.634346
M : Type u_2
M' : Type ?u.634352
N : Type u_3
P : Type ?u.634358
G : Type ?u.634361
H : Type ?u.634364
R : Type u_1
S : Type ?u.634370
x✝ : Monoid R
inst✝³ : AddMonoid M
inst✝² : DistribMulAction R M
inst✝¹ : AddMonoid N
inst✝ : DistribMulAction R N
f : M → N
hf : f 0 = 0
c : R
v : α →₀ M
hsmul : ∀ (x : M), f (c • x) = c • f x
this : f ∘ (fun x x_1 => x • x_1) c = (fun x x_1 => x • x_1) c ∘ f
⊢ mapRange (f ∘ (fun x x_1 => x • x_1) c) ?h v = c • mapRange f hf v

case h
α : Type u_4
β : Type ?u.634340
γ : Type ?u.634343
ι : Type ?u.634346
M : Type u_2
M' : Type ?u.634352
N : Type u_3
P : Type ?u.634358
G : Type ?u.634361
H : Type ?u.634364
R : Type u_1
S : Type ?u.634370
x✝ : Monoid R
inst✝³ : AddMonoid M
inst✝² : DistribMulAction R M
inst✝¹ : AddMonoid N
inst✝ : DistribMulAction R N
f : M → N
hf : f 0 = 0
c : R
v : α →₀ M
hsmul : ∀ (x : M), f (c • x) = c • f x
⊢ (f ∘ (fun x x_1 => x • x_1) c) 0 = 0

tactic: apply mapRange_comp
state_before: α : Type u_4
β : Type ?u.634340
γ : Type ?u.634343
ι : Type ?u.634346
M : Type u_2
M' : Type ?u.634352
N : Type u_3
P : Type ?u.634358
G : Type ?u.634361
H : Type ?u.634364
R : Type u_1
S : Type ?u.634370
x✝ : Monoid R
inst✝³ : AddMonoid M
inst✝² : DistribMulAction R M
inst✝¹ : AddMonoid N
inst✝ : DistribMulAction R N
f : M → N
hf : f 0 = 0
c : R
v : α →₀ M
hsmul : ∀ (x : M), f (c • x) = c • f x
this : f ∘ (fun x x_1 => x • x_1) c = (fun x x_1 => x • x_1) c ∘ f
⊢ mapRange ((fun x => c • x) ∘ f) (_ : ((fun x => c • x) ∘ f) 0 = 0) v = c • mapRange f hf v

case h
α : Type u_4
β : Type ?u.634340
γ : Type ?u.634343
ι : Type ?u.634346
M : Type u_2
M' : Type ?u.634352
N : Type u_3
P : Type ?u.634358
G : Type ?u.634361
H : Type ?u.634364
R : Type u_1
S : Type ?u.634370
x✝ : Monoid R
inst✝³ : AddMonoid M
inst✝² : DistribMulAction R M
inst✝¹ : AddMonoid N
inst✝ : DistribMulAction R N
f : M → N
hf : f 0 = 0
c : R
v : α →₀ M
hsmul : ∀ (x : M), f (c • x) = c • f x
⊢ (f ∘ (fun x x_1 => x • x_1) c) 0 = 0

tactic: simp only [Function.comp_apply, smul_zero, hf]
state_before: case h
α : Type u_4
β : Type ?u.634340
γ : Type ?u.634343
ι : Type ?u.634346
M : Type u_2
M' : Type ?u.634352
N : Type u_3
P : Type ?u.634358
G : Type ?u.634361
H : Type ?u.634364
R : Type u_1
S : Type ?u.634370
x✝ : Monoid R
inst✝³ : AddMonoid M
inst✝² : DistribMulAction R M
inst✝¹ : AddMonoid N
inst✝ : DistribMulAction R N
f : M → N
hf : f 0 = 0
c : R
v : α →₀ M
hsmul : ∀ (x : M), f (c • x) = c • f x
⊢ (f ∘ (fun x x_1 => x • x_1) c) 0 = 0
Theorem: OrthonormalBasis.repr_apply_apply
File: Mathlib/Analysis/InnerProductSpace/PiL2.lean

tactic: classical
  rw [← b.repr.inner_map_map (b i) v, b.repr_self i, EuclideanSpace.inner_single_left]
  simp only [one_mul, eq_self_iff_true, map_one]
state_before: ι : Type u_1
ι' : Type ?u.777506
𝕜 : Type u_2
inst✝⁹ : IsROrC 𝕜
E : Type u_3
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : InnerProductSpace 𝕜 E
E' : Type ?u.777535
inst✝⁶ : NormedAddCommGroup E'
inst✝⁵ : InnerProductSpace 𝕜 E'
F : Type ?u.777553
inst✝⁴ : NormedAddCommGroup F
inst✝³ : InnerProductSpace ℝ F
F' : Type ?u.777573
inst✝² : NormedAddCommGroup F'
inst✝¹ : InnerProductSpace ℝ F'
inst✝ : Fintype ι
b : OrthonormalBasis ι 𝕜 E
v : E
i : ι
⊢ ↑b.repr v i = inner (↑b i) v

tactic: rw [← b.repr.inner_map_map (b i) v, b.repr_self i, EuclideanSpace.inner_single_left]
state_before: ι : Type u_1
ι' : Type ?u.777506
𝕜 : Type u_2
inst✝⁹ : IsROrC 𝕜
E : Type u_3
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : InnerProductSpace 𝕜 E
E' : Type ?u.777535
inst✝⁶ : NormedAddCommGroup E'
inst✝⁵ : InnerProductSpace 𝕜 E'
F : Type ?u.777553
inst✝⁴ : NormedAddCommGroup F
inst✝³ : InnerProductSpace ℝ F
F' : Type ?u.777573
inst✝² : NormedAddCommGroup F'
inst✝¹ : InnerProductSpace ℝ F'
inst✝ : Fintype ι
b : OrthonormalBasis ι 𝕜 E
v : E
i : ι
⊢ ↑b.repr v i = inner (↑b i) v

tactic: simp only [one_mul, eq_self_iff_true, map_one]
state_before: ι : Type u_1
ι' : Type ?u.777506
𝕜 : Type u_2
inst✝⁹ : IsROrC 𝕜
E : Type u_3
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : InnerProductSpace 𝕜 E
E' : Type ?u.777535
inst✝⁶ : NormedAddCommGroup E'
inst✝⁵ : InnerProductSpace 𝕜 E'
F : Type ?u.777553
inst✝⁴ : NormedAddCommGroup F
inst✝³ : InnerProductSpace ℝ F
F' : Type ?u.777573
inst✝² : NormedAddCommGroup F'
inst✝¹ : InnerProductSpace ℝ F'
inst✝ : Fintype ι
b : OrthonormalBasis ι 𝕜 E
v : E
i : ι
⊢ ↑b.repr v i = ↑(starRingEnd 𝕜) 1 * ↑b.repr v i
Theorem: Int.lt.dest
File: Std/Data/Int/Lemmas.lean

tactic: rwa [Int.add_comm, Int.add_left_comm] at h
state_before: a b : Int
h✝ : a < b
n : Nat
h : a + 1 + ↑n = b
⊢ a + ↑(succ n) = b
Theorem: Nat.frequently_odd
File: Mathlib/Order/Filter/ModEq.lean

tactic: simpa only [odd_iff] using frequently_mod_eq one_lt_two
state_before: ⊢ ∃ᶠ (m : ℕ) in atTop, Odd m
Theorem: StateT.seqLeft_eq
File: src/lean/Init/Control/Lawful.lean

tactic: apply ext
state_before: m : Type u_1 → Type u_2
σ α β : Type u_1
inst✝¹ : Monad m
inst✝ : LawfulMonad m
x : StateT σ m α
y : StateT σ m β
⊢ (SeqLeft.seqLeft x fun x => y) = Seq.seq (const β <$> x) fun x => y

tactic: intro s
state_before: case h
m : Type u_1 → Type u_2
σ α β : Type u_1
inst✝¹ : Monad m
inst✝ : LawfulMonad m
x : StateT σ m α
y : StateT σ m β
⊢ ∀ (s : σ), run (SeqLeft.seqLeft x fun x => y) s = run (Seq.seq (const β <$> x) fun x => y) s

tactic: simp [map_eq_pure_bind]
state_before: case h
m : Type u_1 → Type u_2
σ α β : Type u_1
inst✝¹ : Monad m
inst✝ : LawfulMonad m
x : StateT σ m α
y : StateT σ m β
s : σ
⊢ run (SeqLeft.seqLeft x fun x => y) s = run (Seq.seq (const β <$> x) fun x => y) s
Theorem: Convex.combo_self_interior_subset_interior
File: Mathlib/Analysis/Convex/Topology.lean

tactic: rw [add_comm]
state_before: ι : Type ?u.70178
𝕜 : Type u_2
E : Type u_1
inst✝⁵ : LinearOrderedField 𝕜
inst✝⁴ : AddCommGroup E
inst✝³ : Module 𝕜 E
inst✝² : TopologicalSpace E
inst✝¹ : TopologicalAddGroup E
inst✝ : ContinuousConstSMul 𝕜 E
s : Set E
hs : Convex 𝕜 s
a b : 𝕜
ha : 0 ≤ a
hb : 0 < b
hab : a + b = 1
⊢ a • s + b • interior s ⊆ interior s

tactic: exact hs.combo_interior_self_subset_interior hb ha (add_comm a b ▸ hab)
state_before: ι : Type ?u.70178
𝕜 : Type u_2
E : Type u_1
inst✝⁵ : LinearOrderedField 𝕜
inst✝⁴ : AddCommGroup E
inst✝³ : Module 𝕜 E
inst✝² : TopologicalSpace E
inst✝¹ : TopologicalAddGroup E
inst✝ : ContinuousConstSMul 𝕜 E
s : Set E
hs : Convex 𝕜 s
a b : 𝕜
ha : 0 ≤ a
hb : 0 < b
hab : a + b = 1
⊢ b • interior s + a • s ⊆ interior s
Theorem: MeasureTheory.VectorMeasure.AbsolutelyContinuous.neg_left
File: Mathlib/MeasureTheory/Measure/VectorMeasure.lean

tactic: intro s hs
state_before: α : Type u_2
β : Type ?u.626718
m : MeasurableSpace α
L : Type ?u.626724
M✝ : Type ?u.626727
N : Type u_3
inst✝⁸ : AddCommMonoid L
inst✝⁷ : TopologicalSpace L
inst✝⁶ : AddCommMonoid M✝
inst✝⁵ : TopologicalSpace M✝
inst✝⁴ : AddCommMonoid N
inst✝³ : TopologicalSpace N
v✝ : VectorMeasure α M✝
w✝ : VectorMeasure α N
M : Type u_1
inst✝² : AddCommGroup M
inst✝¹ : TopologicalSpace M
inst✝ : TopologicalAddGroup M
v : VectorMeasure α M
w : VectorMeasure α N
h : v ≪ᵥ w
⊢ -v ≪ᵥ w

tactic: rw [neg_apply, h hs, neg_zero]
state_before: α : Type u_2
β : Type ?u.626718
m : MeasurableSpace α
L : Type ?u.626724
M✝ : Type ?u.626727
N : Type u_3
inst✝⁸ : AddCommMonoid L
inst✝⁷ : TopologicalSpace L
inst✝⁶ : AddCommMonoid M✝
inst✝⁵ : TopologicalSpace M✝
inst✝⁴ : AddCommMonoid N
inst✝³ : TopologicalSpace N
v✝ : VectorMeasure α M✝
w✝ : VectorMeasure α N
M : Type u_1
inst✝² : AddCommGroup M
inst✝¹ : TopologicalSpace M
inst✝ : TopologicalAddGroup M
v : VectorMeasure α M
w : VectorMeasure α N
h : v ≪ᵥ w
s : Set α
hs : ↑w s = 0
⊢ ↑(-v) s = 0
Theorem: sq_add_mul_sq_mul_sq_add_mul_sq
File: Mathlib/Algebra/GroupPower/Identities.lean

tactic: ring
state_before: R : Type u_1
inst✝ : CommRing R
a b x₁ x₂ x₃ x₄ x₅ x₆ x₇ x₈ y₁ y₂ y₃ y₄ y₅ y₆ y₇ y₈ n : R
⊢ (x₁ ^ 2 + n * x₂ ^ 2) * (y₁ ^ 2 + n * y₂ ^ 2) = (x₁ * y₁ - n * x₂ * y₂) ^ 2 + n * (x₁ * y₂ + x₂ * y₁) ^ 2
Theorem: List.permutationsAux2_comp_append
File: Mathlib/Data/List/Permutation.lean

tactic: induction' ys with ys_hd _ ys_ih generalizing f
state_before: α : Type u_1
β : Type u_2
t : α
ts ys : List α
r : List β
f : List α → β
⊢ (permutationsAux2 t [] r ys fun x => f (x ++ ts)).snd = (permutationsAux2 t ts r ys f).snd

tactic: simp
state_before: case nil
α : Type u_1
β : Type u_2
t : α
ts : List α
r : List β
f✝ f : List α → β
⊢ (permutationsAux2 t [] r [] fun x => f (x ++ ts)).snd = (permutationsAux2 t ts r [] f).snd

tactic: simp [ys_ih fun xs => f (ys_hd :: xs)]
state_before: case cons
α : Type u_1
β : Type u_2
t : α
ts : List α
r : List β
f✝ : List α → β
ys_hd : α
tail✝ : List α
ys_ih :
  ∀ (f : List α → β), (permutationsAux2 t [] r tail✝ fun x => f (x ++ ts)).snd = (permutationsAux2 t ts r tail✝ f).snd
f : List α → β
⊢ (permutationsAux2 t [] r (ys_hd :: tail✝) fun x => f (x ++ ts)).snd = (permutationsAux2 t ts r (ys_hd :: tail✝) f).snd
Theorem: Polynomial.Monic.degree_mul
File: Mathlib/Data/Polynomial/Degree/Definitions.lean

tactic: simp [hp]
state_before: R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Semiring R
p q : R[X]
ι : Type ?u.658581
hq : Monic q
hp : p = 0
⊢ degree (p * q) = degree p + degree q

tactic: rwa [hq.leadingCoeff, mul_one, Ne.def, leadingCoeff_eq_zero]
state_before: R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Semiring R
p q : R[X]
ι : Type ?u.658581
hq : Monic q
hp : ¬p = 0
⊢ Polynomial.leadingCoeff p * Polynomial.leadingCoeff q ≠ 0
Theorem: Nat.not_dvd_iff_between_consec_multiples
File: Mathlib/Data/Nat/Order/Lemmas.lean

tactic: refine'
  ⟨fun ⟨k, hk1, hk2⟩ => not_dvd_of_between_consec_multiples hk1 hk2, fun han =>
    ⟨n / a, ⟨lt_of_le_of_ne (mul_div_le n a) _, lt_mul_div_succ _ ha⟩⟩⟩
state_before: a✝ b m n✝ k n a : ℕ
ha : 0 < a
⊢ (∃ k, a * k < n ∧ n < a * (k + 1)) ↔ ¬a ∣ n

tactic: exact mt (Dvd.intro (n / a)) han
state_before: a✝ b m n✝ k n a : ℕ
ha : 0 < a
han : ¬a ∣ n
⊢ a * (n / a) ≠ n
Theorem: Nat.cast_ceil_eq_cast_int_ceil
File: Mathlib/Algebra/Order/Floor.lean

tactic: rw [← Nat.cast_ceil_eq_int_ceil ha, Int.cast_ofNat]
state_before: F : Type ?u.311700
α : Type u_1
β : Type ?u.311706
inst✝¹ : LinearOrderedRing α
inst✝ : FloorRing α
a : α
ha : 0 ≤ a
⊢ ↑⌈a⌉₊ = ↑⌈a⌉
Theorem: div_mul_cancel''
File: Mathlib/Algebra/Group/Basic.lean

tactic: rw [← inv_div, mul_div_cancel''']
state_before: α : Type ?u.72204
β : Type ?u.72207
G : Type u_1
inst✝ : CommGroup G
a✝ b✝ c d a b : G
⊢ a / (a * b) = b⁻¹
Theorem: Int.mul_ediv_assoc
File: Std/Data/Int/DivMod.lean

tactic: simp [cz, Int.mul_zero]
state_before: a c d : Int
cz : c = 0
⊢ a * (c * d) / c = a * (c * d / c)

tactic: rw [Int.mul_left_comm, Int.mul_ediv_cancel_left _ cz, Int.mul_ediv_cancel_left _ cz]
state_before: a c d : Int
cz : ¬c = 0
⊢ a * (c * d) / c = a * (c * d / c)
Theorem: ContinuousLinearMap.apply_norm_eq_sqrt_inner_adjoint_right
File: Mathlib/Analysis/InnerProductSpace/Adjoint.lean

tactic: rw [← apply_norm_sq_eq_inner_adjoint_right, Real.sqrt_sq (norm_nonneg _)]
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type ?u.739707
G : Type ?u.739710
inst✝⁹ : IsROrC 𝕜
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : NormedAddCommGroup G
inst✝⁵ : InnerProductSpace 𝕜 E
inst✝⁴ : InnerProductSpace 𝕜 F
inst✝³ : InnerProductSpace 𝕜 G
inst✝² : CompleteSpace E
inst✝¹ : CompleteSpace G
inst✝ : CompleteSpace F
A : E →L[𝕜] E
x : E
⊢ ‖↑A x‖ = Real.sqrt (↑re (inner x (↑(↑adjoint A * A) x)))
Theorem: Equiv.some_removeNone_iff
File: Mathlib/Logic/Equiv/Option.lean

tactic: cases' h : e (some x) with a
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.6621
e : Option α ≃ Option β
x : α
⊢ some (↑(removeNone e) x) = ↑e none ↔ ↑e.symm none = some x

tactic: rw [removeNone_none _ h]
state_before: case none
α : Type u_2
β : Type u_1
γ : Type ?u.6621
e : Option α ≃ Option β
x : α
h : ↑e (some x) = none
⊢ some (↑(removeNone e) x) = ↑e none ↔ ↑e.symm none = some x

tactic: simpa using (congr_arg e.symm h).symm
state_before: case none
α : Type u_2
β : Type u_1
γ : Type ?u.6621
e : Option α ≃ Option β
x : α
h : ↑e (some x) = none
⊢ ↑e none = ↑e none ↔ ↑e.symm none = some x

tactic: rw [removeNone_some _ ⟨a, h⟩]
state_before: case some
α : Type u_2
β : Type u_1
γ : Type ?u.6621
e : Option α ≃ Option β
x : α
a : β
h : ↑e (some x) = some a
⊢ some (↑(removeNone e) x) = ↑e none ↔ ↑e.symm none = some x

tactic: have h1 := congr_arg e.symm h
state_before: case some
α : Type u_2
β : Type u_1
γ : Type ?u.6621
e : Option α ≃ Option β
x : α
a : β
h : ↑e (some x) = some a
⊢ ↑e (some x) = ↑e none ↔ ↑e.symm none = some x

tactic: rw [symm_apply_apply] at h1
state_before: case some
α : Type u_2
β : Type u_1
γ : Type ?u.6621
e : Option α ≃ Option β
x : α
a : β
h : ↑e (some x) = some a
h1 : ↑e.symm (↑e (some x)) = ↑e.symm (some a)
⊢ ↑e (some x) = ↑e none ↔ ↑e.symm none = some x

tactic: simp only [false_iff_iff, apply_eq_iff_eq]
state_before: case some
α : Type u_2
β : Type u_1
γ : Type ?u.6621
e : Option α ≃ Option β
x : α
a : β
h : ↑e (some x) = some a
h1 : some x = ↑e.symm (some a)
⊢ ↑e (some x) = ↑e none ↔ ↑e.symm none = some x

tactic: simp [h1, apply_eq_iff_eq]
state_before: case some
α : Type u_2
β : Type u_1
γ : Type ?u.6621
e : Option α ≃ Option β
x : α
a : β
h : ↑e (some x) = some a
h1 : some x = ↑e.symm (some a)
⊢ ¬↑e.symm none = some x
Theorem: InnerProductGeometry.angle_smul_right_of_neg
File: Mathlib/Geometry/Euclidean/Angle/Unoriented/Basic.lean

tactic: rw [← neg_neg r, neg_smul, angle_neg_right, angle_smul_right_of_pos x y (neg_pos_of_neg hr),
  angle_neg_right]
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x✝ y✝ x y : V
r : ℝ
hr : r < 0
⊢ angle x (r • y) = angle x (-y)
Theorem: LocallyConstant.coe_comap
File: Mathlib/Topology/LocallyConstant/Basic.lean

tactic: rw [comap, dif_pos hf]
state_before: X : Type u_3
Y : Type u_1
Z : Type u_2
α : Type ?u.31928
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
f : X → Y
g : LocallyConstant Y Z
hf : Continuous f
⊢ ↑(comap f g) = ↑g ∘ f

tactic: rfl
state_before: X : Type u_3
Y : Type u_1
Z : Type u_2
α : Type ?u.31928
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
f : X → Y
g : LocallyConstant Y Z
hf : Continuous f
⊢ ↑{ toFun := ↑g ∘ f, isLocallyConstant := (_ : IsLocallyConstant (g.toFun ∘ f)) } = ↑g ∘ f
Theorem: Real.one_lt_rpow_of_pos_of_lt_one_of_neg
File: Mathlib/Analysis/SpecialFunctions/Pow/Real.lean

tactic: convert rpow_lt_rpow_of_exponent_gt hx1 hx2 hz
state_before: x y z : ℝ
hx1 : 0 < x
hx2 : x < 1
hz : z < 0
⊢ 1 < x ^ z

tactic: exact (rpow_zero x).symm
state_before: case h.e'_3
x y z : ℝ
hx1 : 0 < x
hx2 : x < 1
hz : z < 0
⊢ 1 = x ^ 0
Theorem: Stream'.WSeq.head_some_of_head_tail_some
File: Mathlib/Data/Seq/WSeq.lean

tactic: unfold head at h
state_before: α : Type u
β : Type v
γ : Type w
s : WSeq α
a : α
h : some a ∈ head (tail s)
⊢ ∃ a', some a' ∈ head s

tactic: rcases Computation.exists_of_mem_map h with ⟨o, md, e⟩
state_before: α : Type u
β : Type v
γ : Type w
s : WSeq α
a : α
h : some a ∈ Computation.map (fun x => Prod.fst <$> x) (destruct (tail s))
⊢ ∃ a', some a' ∈ head s

tactic: clear h
state_before: case intro.intro
α : Type u
β : Type v
γ : Type w
s : WSeq α
a : α
h : some a ∈ Computation.map (fun x => Prod.fst <$> x) (destruct (tail s))
o : Option (α × WSeq α)
md : o ∈ destruct (tail s)
e : Prod.fst <$> o = some a
⊢ ∃ a', some a' ∈ head s

tactic: cases' o with o <;> [injection e; injection e with h']
state_before: case intro.intro
α : Type u
β : Type v
γ : Type w
s : WSeq α
a : α
o : Option (α × WSeq α)
md : o ∈ destruct (tail s)
e : Prod.fst <$> o = some a
⊢ ∃ a', some a' ∈ head s

tactic: clear h'
state_before: case intro.intro.some
α : Type u
β : Type v
γ : Type w
s : WSeq α
a : α
o : α × WSeq α
md : some o ∈ destruct (tail s)
h' : o.fst = a
⊢ ∃ a', some a' ∈ head s

tactic: cases' destruct_some_of_destruct_tail_some md with a am
state_before: case intro.intro.some
α : Type u
β : Type v
γ : Type w
s : WSeq α
a : α
o : α × WSeq α
md : some o ∈ destruct (tail s)
⊢ ∃ a', some a' ∈ head s
Theorem: CategoryTheory.Presieve.in_coverByImage
File: Mathlib/CategoryTheory/Sites/DenseSubsite.lean

tactic: simp
state_before: C : Type u_3
inst✝² : Category C
D : Type u_4
inst✝¹ : Category D
E : Type ?u.4289
inst✝ : Category E
J : GrothendieckTopology C
K : GrothendieckTopology D
L : GrothendieckTopology E
G : C ⥤ D
X : D
Y : C
f : G.obj Y ⟶ X
⊢ 𝟙 (G.obj Y) ≫ f = f