tasksource/leandojo huggingface dataset:
Theorem: Nat.digits_two_eq_bits
File: Mathlib/Data/Nat/Digits.lean

tactic: induction' n using Nat.binaryRecFromOne with b n h ih
state_before: n✝ n : ℕ
⊢ digits 2 n = List.map (fun b => bif b then 1 else 0) (bits n)

tactic: rw [bits_append_bit _ _ fun hn => absurd hn h]
state_before: case f
n✝ : ℕ
b : Bool
n : ℕ
h : n ≠ 0
ih : digits 2 n = List.map (fun b => bif b then 1 else 0) (bits n)
⊢ digits 2 (bit b n) = List.map (fun b => bif b then 1 else 0) (bits (bit b n))

tactic: cases b
state_before: case f
n✝ : ℕ
b : Bool
n : ℕ
h : n ≠ 0
ih : digits 2 n = List.map (fun b => bif b then 1 else 0) (bits n)
⊢ digits 2 (bit b n) = List.map (fun b => bif b then 1 else 0) (b :: bits n)

tactic: simp
state_before: case z₀
n : ℕ
⊢ digits 2 0 = List.map (fun b => bif b then 1 else 0) (bits 0)

tactic: simp
state_before: case z₁
n : ℕ
⊢ digits 2 1 = List.map (fun b => bif b then 1 else 0) (bits 1)

tactic: trivial
state_before: case z₁
n : ℕ
⊢ digits 2 (1 / 2) =
    List.map (fun b => bif b then 1 else 0)
      (Acc.rec (fun x₁ h ih => if h : x₁ = 0 then [] else bodd x₁ :: ih (div2 x₁) (_ : div2 x₁ < x₁))
        (_ : Acc (InvImage WellFoundedRelation.rel fun a => sizeOf a) (div2 1)))

tactic: rw [digits_def' one_lt_two]
state_before: case f.false
n✝ n : ℕ
h : n ≠ 0
ih : digits 2 n = List.map (fun b => bif b then 1 else 0) (bits n)
⊢ digits 2 (bit false n) = List.map (fun b => bif b then 1 else 0) (false :: bits n)

tactic: simpa [Nat.bit, Nat.bit0_val n]
state_before: case f.false
n✝ n : ℕ
h : n ≠ 0
ih : digits 2 n = List.map (fun b => bif b then 1 else 0) (bits n)
⊢ bit false n % 2 :: digits 2 (bit false n / 2) = List.map (fun b => bif b then 1 else 0) (false :: bits n)

tactic: simpa [pos_iff_ne_zero, bit_eq_zero_iff]
state_before: case f.false
n✝ n : ℕ
h : n ≠ 0
ih : digits 2 n = List.map (fun b => bif b then 1 else 0) (bits n)
⊢ 0 < bit false n

tactic: simpa [Nat.bit, Nat.bit1_val n, add_comm, digits_add 2 one_lt_two 1 n]
state_before: case f.true
n✝ n : ℕ
h : n ≠ 0
ih : digits 2 n = List.map (fun b => bif b then 1 else 0) (bits n)
⊢ digits 2 (bit true n) = List.map (fun b => bif b then 1 else 0) (true :: bits n)
Theorem: List.sorted_ofFn_iff
File: Mathlib/Data/List/Sort.lean

tactic: simp_rw [Sorted, pairwise_iff_get, get_ofFn, Relator.LiftFun]
state_before: n : ℕ
α : Type uu
inst✝ : Preorder α
f : Fin n → α
r : α → α → Prop
⊢ Sorted r (ofFn f) ↔ ((fun x x_1 => x < x_1) ⇒ r) f f

tactic: exact Iff.symm (Fin.cast _).surjective.forall₂
state_before: n : ℕ
α : Type uu
inst✝ : Preorder α
f : Fin n → α
r : α → α → Prop
⊢ (∀ (i j : Fin (length (ofFn f))),
      i < j → r (f (↑(Fin.cast (_ : length (ofFn f) = n)) i)) (f (↑(Fin.cast (_ : length (ofFn f) = n)) j))) ↔
    ∀ ⦃a b : Fin n⦄, a < b → r (f a) (f b)
Theorem: Sbtw.angle₃₂₁_eq_pi
File: Mathlib/Geometry/Euclidean/Angle/Unoriented/Affine.lean

tactic: rw [← h.angle₁₂₃_eq_pi, angle_comm]
state_before: V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
p₁ p₂ p₃ : P
h : Sbtw ℝ p₁ p₂ p₃
⊢ ∠ p₃ p₂ p₁ = π
Theorem: lp.norm_le_of_tsum_le
File: Mathlib/Analysis/NormedSpace/lpSpace.lean

tactic: rw [← Real.rpow_le_rpow_iff (norm_nonneg' _) hC hp, norm_rpow_eq_tsum hp]
state_before: α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
hp : 0 < ENNReal.toReal p
C : ℝ
hC : 0 ≤ C
f : { x // x ∈ lp E p }
hf : (∑' (i : α), ‖↑f i‖ ^ ENNReal.toReal p) ≤ C ^ ENNReal.toReal p
⊢ ‖f‖ ≤ C

tactic: exact hf
state_before: α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
hp : 0 < ENNReal.toReal p
C : ℝ
hC : 0 ≤ C
f : { x // x ∈ lp E p }
hf : (∑' (i : α), ‖↑f i‖ ^ ENNReal.toReal p) ≤ C ^ ENNReal.toReal p
⊢ (∑' (i : α), ‖↑f i‖ ^ ENNReal.toReal p) ≤ C ^ ENNReal.toReal p
Theorem: Int.fract_intCast
File: Mathlib/Algebra/Order/Floor.lean

tactic: unfold fract
state_before: F : Type ?u.159767
α : Type u_1
β : Type ?u.159773
inst✝¹ : LinearOrderedRing α
inst✝ : FloorRing α
z✝ : ℤ
a : α
z : ℤ
⊢ fract ↑z = 0

tactic: rw [floor_intCast]
state_before: F : Type ?u.159767
α : Type u_1
β : Type ?u.159773
inst✝¹ : LinearOrderedRing α
inst✝ : FloorRing α
z✝ : ℤ
a : α
z : ℤ
⊢ ↑z - ↑⌊↑z⌋ = 0

tactic: exact sub_self _
state_before: F : Type ?u.159767
α : Type u_1
β : Type ?u.159773
inst✝¹ : LinearOrderedRing α
inst✝ : FloorRing α
z✝ : ℤ
a : α
z : ℤ
⊢ ↑z - ↑z = 0
Theorem: Even.zpow_abs
File: Mathlib/Algebra/Order/Field/Power.lean

tactic: cases' abs_choice a with h h <;> simp only [h, hp.neg_zpow _]
state_before: α : Type u_1
inst✝ : LinearOrderedField α
a✝ b c d : α
n p : ℤ
hp : Even p
a : α
⊢ abs a ^ p = a ^ p
Theorem: List.nthLe_set_of_ne
File: Mathlib/Data/List/Basic.lean

tactic: simpa using hj
state_before: ι : Type ?u.111606
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ l : List α
i j : ℕ
h : i ≠ j
a : α
hj : j < length (set l i a)
⊢ j < length l
Theorem: Real.volume_pi_closedBall
File: Mathlib/MeasureTheory/Measure/Lebesgue/Basic.lean

tactic: simp only [MeasureTheory.volume_pi_closedBall a hr, volume_closedBall, Finset.prod_const]
state_before: ι : Type u_1
inst✝ : Fintype ι
a : ι → ℝ
r : ℝ
hr : 0 ≤ r
⊢ ↑↑volume (Metric.closedBall a r) = ofReal ((2 * r) ^ Fintype.card ι)

tactic: exact (ENNReal.ofReal_pow (mul_nonneg zero_le_two hr) _).symm
state_before: ι : Type u_1
inst✝ : Fintype ι
a : ι → ℝ
r : ℝ
hr : 0 ≤ r
⊢ ofReal (2 * r) ^ Finset.card Finset.univ = ofReal ((2 * r) ^ Fintype.card ι)
Theorem: Convex.mem_extremePoints_iff_convex_diff
File: Mathlib/Analysis/Convex/Extreme.lean

tactic: use fun hx ↦ ⟨hx.1, (mem_extremePoints_iff_extreme_singleton.1 hx).convex_diff hA⟩
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type ?u.45230
ι : Type ?u.45233
π : ι → Type ?u.45238
inst✝⁴ : LinearOrderedRing 𝕜
inst✝³ : AddCommGroup E
inst✝² : Module 𝕜 E
inst✝¹ : DenselyOrdered 𝕜
inst✝ : NoZeroSMulDivisors 𝕜 E
A B : Set E
x : E
hA : Convex 𝕜 A
⊢ x ∈ extremePoints 𝕜 A ↔ x ∈ A ∧ Convex 𝕜 (A \ {x})

tactic: rintro ⟨hxA, hAx⟩
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type ?u.45230
ι : Type ?u.45233
π : ι → Type ?u.45238
inst✝⁴ : LinearOrderedRing 𝕜
inst✝³ : AddCommGroup E
inst✝² : Module 𝕜 E
inst✝¹ : DenselyOrdered 𝕜
inst✝ : NoZeroSMulDivisors 𝕜 E
A B : Set E
x : E
hA : Convex 𝕜 A
⊢ x ∈ A ∧ Convex 𝕜 (A \ {x}) → x ∈ extremePoints 𝕜 A

tactic: refine' mem_extremePoints_iff_forall_segment.2 ⟨hxA, fun x₁ hx₁ x₂ hx₂ hx ↦ _⟩
state_before: case intro
𝕜 : Type u_1
E : Type u_2
F : Type ?u.45230
ι : Type ?u.45233
π : ι → Type ?u.45238
inst✝⁴ : LinearOrderedRing 𝕜
inst✝³ : AddCommGroup E
inst✝² : Module 𝕜 E
inst✝¹ : DenselyOrdered 𝕜
inst✝ : NoZeroSMulDivisors 𝕜 E
A B : Set E
x : E
hA : Convex 𝕜 A
hxA : x ∈ A
hAx : Convex 𝕜 (A \ {x})
⊢ x ∈ extremePoints 𝕜 A

tactic: rw [convex_iff_segment_subset] at hAx
state_before: case intro
𝕜 : Type u_1
E : Type u_2
F : Type ?u.45230
ι : Type ?u.45233
π : ι → Type ?u.45238
inst✝⁴ : LinearOrderedRing 𝕜
inst✝³ : AddCommGroup E
inst✝² : Module 𝕜 E
inst✝¹ : DenselyOrdered 𝕜
inst✝ : NoZeroSMulDivisors 𝕜 E
A B : Set E
x : E
hA : Convex 𝕜 A
hxA : x ∈ A
hAx : Convex 𝕜 (A \ {x})
x₁ : E
hx₁ : x₁ ∈ A
x₂ : E
hx₂ : x₂ ∈ A
hx : x ∈ [x₁-[𝕜]x₂]
⊢ x₁ = x ∨ x₂ = x

tactic: by_contra' h
state_before: case intro
𝕜 : Type u_1
E : Type u_2
F : Type ?u.45230
ι : Type ?u.45233
π : ι → Type ?u.45238
inst✝⁴ : LinearOrderedRing 𝕜
inst✝³ : AddCommGroup E
inst✝² : Module 𝕜 E
inst✝¹ : DenselyOrdered 𝕜
inst✝ : NoZeroSMulDivisors 𝕜 E
A B : Set E
x : E
hA : Convex 𝕜 A
hxA : x ∈ A
hAx : ∀ ⦃x_1 : E⦄, x_1 ∈ A \ {x} → ∀ ⦃y : E⦄, y ∈ A \ {x} → [x_1-[𝕜]y] ⊆ A \ {x}
x₁ : E
hx₁ : x₁ ∈ A
x₂ : E
hx₂ : x₂ ∈ A
hx : x ∈ [x₁-[𝕜]x₂]
⊢ x₁ = x ∨ x₂ = x

tactic: exact (hAx ⟨hx₁, fun hx₁ ↦ h.1 (mem_singleton_iff.2 hx₁)⟩
    ⟨hx₂, fun hx₂ ↦ h.2 (mem_singleton_iff.2 hx₂)⟩ hx).2 rfl
state_before: case intro
𝕜 : Type u_1
E : Type u_2
F : Type ?u.45230
ι : Type ?u.45233
π : ι → Type ?u.45238
inst✝⁴ : LinearOrderedRing 𝕜
inst✝³ : AddCommGroup E
inst✝² : Module 𝕜 E
inst✝¹ : DenselyOrdered 𝕜
inst✝ : NoZeroSMulDivisors 𝕜 E
A B : Set E
x : E
hA : Convex 𝕜 A
hxA : x ∈ A
hAx : ∀ ⦃x_1 : E⦄, x_1 ∈ A \ {x} → ∀ ⦃y : E⦄, y ∈ A \ {x} → [x_1-[𝕜]y] ⊆ A \ {x}
x₁ : E
hx₁ : x₁ ∈ A
x₂ : E
hx₂ : x₂ ∈ A
hx : x ∈ [x₁-[𝕜]x₂]
h : x₁ ≠ x ∧ x₂ ≠ x
⊢ False
Theorem: YoungDiagram.rowLen_anti
File: Mathlib/Combinatorics/Young/YoungDiagram.lean

tactic: by_contra' h_lt
state_before: μ : YoungDiagram
i1 i2 : ℕ
hi : i1 ≤ i2
⊢ rowLen μ i2 ≤ rowLen μ i1

tactic: rw [← lt_self_iff_false (μ.rowLen i1)]
state_before: μ : YoungDiagram
i1 i2 : ℕ
hi : i1 ≤ i2
h_lt : rowLen μ i1 < rowLen μ i2
⊢ False

tactic: rw [← mem_iff_lt_rowLen] at h_lt⊢
state_before: μ : YoungDiagram
i1 i2 : ℕ
hi : i1 ≤ i2
h_lt : rowLen μ i1 < rowLen μ i2
⊢ rowLen μ i1 < rowLen μ i1

tactic: exact μ.up_left_mem hi (by rfl) h_lt
state_before: μ : YoungDiagram
i1 i2 : ℕ
hi : i1 ≤ i2
h_lt : (i2, rowLen μ i1) ∈ μ
⊢ (i1, rowLen μ i1) ∈ μ

tactic: rfl
state_before: μ : YoungDiagram
i1 i2 : ℕ
hi : i1 ≤ i2
h_lt : (i2, rowLen μ i1) ∈ μ
⊢ rowLen μ i1 ≤ rowLen μ i1
Theorem: Finsupp.sigma_support
File: Mathlib/Data/Finsupp/Basic.lean

tactic: simp only [Finset.ext_iff, splitSupport, split, comapDomain, @mem_image _ _ (Classical.decEq _),
  mem_preimage, Sigma.forall, mem_sigma]
state_before: α : Type ?u.741366
β : Type ?u.741369
γ : Type ?u.741372
ι : Type u_1
M : Type u_3
M' : Type ?u.741381
N : Type ?u.741384
P : Type ?u.741387
G : Type ?u.741390
H : Type ?u.741393
R : Type ?u.741396
S : Type ?u.741399
αs : ι → Type u_2
inst✝ : Zero M
l : (i : ι) × αs i →₀ M
⊢ l.support = Finset.sigma (splitSupport l) fun i => (split l i).support

tactic: tauto
state_before: α : Type ?u.741366
β : Type ?u.741369
γ : Type ?u.741372
ι : Type u_1
M : Type u_3
M' : Type ?u.741381
N : Type ?u.741384
P : Type ?u.741387
G : Type ?u.741390
H : Type ?u.741393
R : Type ?u.741396
S : Type ?u.741399
αs : ι → Type u_2
inst✝ : Zero M
l : (i : ι) × αs i →₀ M
⊢ ∀ (a : ι) (b : αs a),
    { fst := a, snd := b } ∈ l.support ↔ (∃ a_1, a_1 ∈ l.support ∧ a_1.fst = a) ∧ { fst := a, snd := b } ∈ l.support
Theorem: NonUnitalRingHom.cancel_left
File: Mathlib/Algebra/Hom/Ring.lean

tactic: rw [← comp_apply, h, comp_apply]
state_before: F : Type ?u.38681
α : Type u_3
β : Type u_1
γ : Type u_2
inst✝² : NonUnitalNonAssocSemiring α
inst✝¹ : NonUnitalNonAssocSemiring β
inst✝ : NonUnitalNonAssocSemiring γ
g✝ : β →ₙ+* γ
f : α →ₙ+* β
g : β →ₙ+* γ
f₁ f₂ : α →ₙ+* β
hg : Injective ↑g
h : comp g f₁ = comp g f₂
x : α
⊢ ↑g (↑f₁ x) = ↑g (↑f₂ x)
Theorem: CategoryTheory.Iso.conjAut_apply
File: Mathlib/CategoryTheory/Conj.lean

tactic: aesop_cat
state_before: C : Type u
inst✝ : Category C
X Y : C
α : X ≅ Y
f : Aut X
⊢ ↑(conjAut α) f = α.symm ≪≫ f ≪≫ α
Theorem: CategoryTheory.Limits.biprod.isoCoprod_inv
File: Mathlib/CategoryTheory/Limits/Shapes/Biproducts.lean

tactic: apply biprod.hom_ext <;> apply coprod.hom_ext <;> simp [biprod.isoCoprod]
state_before: J : Type w
C : Type u
inst✝² : Category C
inst✝¹ : HasZeroMorphisms C
P Q X Y : C
inst✝ : HasBinaryBiproduct X Y
⊢ (isoCoprod X Y).inv = coprod.desc inl inr
Theorem: Nat.Partrec.Code.const_inj
File: Mathlib/Computability/PartrecCode.lean

tactic: simp
state_before: x✝ : Code.const 0 = Code.const 0
⊢ 0 = 0

tactic: dsimp [Nat.add_one, Nat.Partrec.Code.const] at h
state_before: n₁ n₂ : ℕ
h : Code.const (n₁ + 1) = Code.const (n₂ + 1)
⊢ n₁ + 1 = n₂ + 1

tactic: injection h with h₁ h₂
state_before: n₁ n₂ : ℕ
h : comp succ (Code.const n₁) = comp succ (Code.const n₂)
⊢ n₁ + 1 = n₂ + 1

tactic: simp only [const_inj h₂]
state_before: n₁ n₂ : ℕ
h₁ : succ = succ
h₂ : Code.const n₁ = Code.const n₂
⊢ n₁ + 1 = n₂ + 1
Theorem: CategoryTheory.Iso.cancel_iso_hom_right_assoc
File: Mathlib/CategoryTheory/Iso.lean

tactic: simp only [← Category.assoc, cancel_mono]
state_before: C : Type u
inst✝ : Category C
X✝ Y✝ Z✝ W X X' Y Z : C
f : W ⟶ X
g : X ⟶ Y
f' : W ⟶ X'
g' : X' ⟶ Y
h : Y ≅ Z
⊢ f ≫ g ≫ h.hom = f' ≫ g' ≫ h.hom ↔ f ≫ g = f' ≫ g'
Theorem: abs_zsmul
File: Mathlib/Algebra/GroupPower/Lemmas.lean

tactic: obtain n0 | n0 := le_total 0 n
state_before: α : Type u_1
M : Type u
N : Type v
G : Type w
H : Type x
A : Type y
B : Type z
R : Type u₁
S : Type u₂
inst✝ : LinearOrderedAddCommGroup α
a✝ b : α
n : ℤ
a : α
⊢ abs (n • a) = abs n • abs a

tactic: obtain ⟨n, rfl⟩ := Int.eq_ofNat_of_zero_le n0
state_before: case inl
α : Type u_1
M : Type u
N : Type v
G : Type w
H : Type x
A : Type y
B : Type z
R : Type u₁
S : Type u₂
inst✝ : LinearOrderedAddCommGroup α
a✝ b : α
n : ℤ
a : α
n0 : 0 ≤ n
⊢ abs (n • a) = abs n • abs a

tactic: simp only [abs_nsmul, coe_nat_zsmul, Nat.abs_cast]
state_before: case inl.intro
α : Type u_1
M : Type u
N : Type v
G : Type w
H : Type x
A : Type y
B : Type z
R : Type u₁
S : Type u₂
inst✝ : LinearOrderedAddCommGroup α
a✝ b a : α
n : ℕ
n0 : 0 ≤ ↑n
⊢ abs (↑n • a) = abs ↑n • abs a

tactic: obtain ⟨m, h⟩ := Int.eq_ofNat_of_zero_le (neg_nonneg.2 n0)
state_before: case inr
α : Type u_1
M : Type u
N : Type v
G : Type w
H : Type x
A : Type y
B : Type z
R : Type u₁
S : Type u₂
inst✝ : LinearOrderedAddCommGroup α
a✝ b : α
n : ℤ
a : α
n0 : n ≤ 0
⊢ abs (n • a) = abs n • abs a

tactic: rw [← abs_neg, ← neg_zsmul, ← abs_neg n, h, coe_nat_zsmul, Nat.abs_cast, coe_nat_zsmul]
state_before: case inr.intro
α : Type u_1
M : Type u
N : Type v
G : Type w
H : Type x
A : Type y
B : Type z
R : Type u₁
S : Type u₂
inst✝ : LinearOrderedAddCommGroup α
a✝ b : α
n : ℤ
a : α
n0 : n ≤ 0
m : ℕ
h : -n = ↑m
⊢ abs (n • a) = abs n • abs a

tactic: exact abs_nsmul m _
state_before: case inr.intro
α : Type u_1
M : Type u
N : Type v
G : Type w
H : Type x
A : Type y
B : Type z
R : Type u₁
S : Type u₂
inst✝ : LinearOrderedAddCommGroup α
a✝ b : α
n : ℤ
a : α
n0 : n ≤ 0
m : ℕ
h : -n = ↑m
⊢ abs (m • a) = m • abs a
Theorem: CategoryTheory.Limits.Trident.condition
File: Mathlib/CategoryTheory/Limits/Shapes/WideEqualizers.lean

tactic: rw [t.app_zero, t.app_zero]
state_before: J : Type w
C : Type u
inst✝ : Category C
X Y : C
f : J → (X ⟶ Y)
j₁ j₂ : J
t : Trident f
⊢ ι t ≫ f j₁ = ι t ≫ f j₂
Theorem: Function.Injective.isDomain
File: Mathlib/Algebra/Hom/Ring.lean

tactic: haveI := pullback_nonzero f f.map_zero f.map_one
state_before: F : Type ?u.111124
α : Type u_1
β : Type u_2
γ : Type ?u.111133
inst✝² : Ring α
inst✝¹ : IsDomain α
inst✝ : Ring β
f : β →+* α
hf : Injective ↑f
⊢ IsDomain β

tactic: haveI := IsRightCancelMulZero.to_noZeroDivisors α
state_before: F : Type ?u.111124
α : Type u_1
β : Type u_2
γ : Type ?u.111133
inst✝² : Ring α
inst✝¹ : IsDomain α
inst✝ : Ring β
f : β →+* α
hf : Injective ↑f
this : Nontrivial β
⊢ IsDomain β

tactic: haveI := hf.noZeroDivisors f f.map_zero f.map_mul
state_before: F : Type ?u.111124
α : Type u_1
β : Type u_2
γ : Type ?u.111133
inst✝² : Ring α
inst✝¹ : IsDomain α
inst✝ : Ring β
f : β →+* α
hf : Injective ↑f
this✝ : Nontrivial β
this : NoZeroDivisors α
⊢ IsDomain β

tactic: exact NoZeroDivisors.to_isDomain β
state_before: F : Type ?u.111124
α : Type u_1
β : Type u_2
γ : Type ?u.111133
inst✝² : Ring α
inst✝¹ : IsDomain α
inst✝ : Ring β
f : β →+* α
hf : Injective ↑f
this✝¹ : Nontrivial β
this✝ : NoZeroDivisors α
this : NoZeroDivisors β
⊢ IsDomain β
Theorem: Polynomial.as_sum_range_C_mul_X_pow
File: Mathlib/Data/Polynomial/Degree/Definitions.lean

tactic: simp only [C_mul_X_pow_eq_monomial]
state_before: R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Semiring R
p✝ q r p : R[X]
⊢ ∑ i in range (natDegree p + 1), ↑(monomial i) (coeff p i) = ∑ i in range (natDegree p + 1), ↑C (coeff p i) * X ^ i
Theorem: PNat.gcdB'_coe
File: Mathlib/Data/PNat/Xgcd.lean

tactic: dsimp [gcdB', gcdY, gcdZ, XgcdType.z]
state_before: a b : ℕ+
⊢ ↑(gcdB' a b) = gcdY a b + ↑(gcdZ a b)

tactic: rw [Nat.succ_eq_add_one, Nat.succ_eq_add_one, add_assoc]
state_before: a b : ℕ+
⊢ succ ((xgcd a b).y + (xgcd a b).zp) = (xgcd a b).y + succ (xgcd a b).zp
Theorem: TopCat.Presheaf.germ_eq
File: Mathlib/Topology/Sheaves/Stalks.lean

tactic: obtain ⟨W, iU, iV, e⟩ :=
  (Types.FilteredColimit.isColimit_eq_iff.{v, v} _
        (isColimitOfPreserves _ (colimit.isColimit ((OpenNhds.inclusion x).op ⋙ F)))).mp h
state_before: C : Type u
inst✝³ : Category C
inst✝² : HasColimits C
X Y Z : TopCat
inst✝¹ : ConcreteCategory C
inst✝ : PreservesFilteredColimits (forget C)
F : Presheaf C X
U V : Opens ↑X
x : ↑X
mU : x ∈ U
mV : x ∈ V
s : (forget C).obj (F.obj U.op)
t : (forget C).obj (F.obj V.op)
h : (forget C).map (germ F { val := x, property := mU }) s = (forget C).map (germ F { val := x, property := mV }) t
⊢ ∃ W _m iU iV, (forget C).map (F.map iU.op) s = (forget C).map (F.map iV.op) t

tactic: exact ⟨(unop W).1, (unop W).2, iU.unop, iV.unop, e⟩
state_before: case intro.intro.intro
C : Type u
inst✝³ : Category C
inst✝² : HasColimits C
X Y Z : TopCat
inst✝¹ : ConcreteCategory C
inst✝ : PreservesFilteredColimits (forget C)
F : Presheaf C X
U V : Opens ↑X
x : ↑X
mU : x ∈ U
mV : x ∈ V
s : (forget C).obj (F.obj U.op)
t : (forget C).obj (F.obj V.op)
h : (forget C).map (germ F { val := x, property := mU }) s = (forget C).map (germ F { val := x, property := mV }) t
W : (OpenNhds x)ᵒᵖ
iU : { obj := U, property := (_ : ↑{ val := x, property := mU } ∈ U) }.op ⟶ W
iV : { obj := V, property := (_ : ↑{ val := x, property := mV } ∈ V) }.op ⟶ W
e :
  ((Functor.op (OpenNhds.inclusion x) ⋙ F) ⋙ forget C).map iU s =
    ((Functor.op (OpenNhds.inclusion x) ⋙ F) ⋙ forget C).map iV t
⊢ ∃ W _m iU iV, (forget C).map (F.map iU.op) s = (forget C).map (F.map iV.op) t
Theorem: Finset.some_mem_insertNone
File: Mathlib/Data/Finset/Option.lean

tactic: simp
state_before: α : Type u_1
β : Type ?u.4048
s : Finset α
a : α
⊢ some a ∈ ↑insertNone s ↔ a ∈ s
Theorem: AlgebraicIndependent.of_comp
File: Mathlib/RingTheory/AlgebraicIndependent.lean

tactic: have : aeval (f ∘ x) = f.comp (aeval x) := by ext; simp
state_before: ι : Type u_4
ι' : Type ?u.331344
R : Type u_1
K : Type ?u.331350
A : Type u_2
A' : Type u_3
A'' : Type ?u.331359
V : Type u
V' : Type ?u.331364
x : ι → A
inst✝⁶ : CommRing R
inst✝⁵ : CommRing A
inst✝⁴ : CommRing A'
inst✝³ : CommRing A''
inst✝² : Algebra R A
inst✝¹ : Algebra R A'
inst✝ : Algebra R A''
a b : R
hx : AlgebraicIndependent R x
f : A →ₐ[R] A'
hfv : AlgebraicIndependent R (↑f ∘ x)
⊢ AlgebraicIndependent R x

tactic: rw [AlgebraicIndependent, this, AlgHom.coe_comp] at hfv
state_before: ι : Type u_4
ι' : Type ?u.331344
R : Type u_1
K : Type ?u.331350
A : Type u_2
A' : Type u_3
A'' : Type ?u.331359
V : Type u
V' : Type ?u.331364
x : ι → A
inst✝⁶ : CommRing R
inst✝⁵ : CommRing A
inst✝⁴ : CommRing A'
inst✝³ : CommRing A''
inst✝² : Algebra R A
inst✝¹ : Algebra R A'
inst✝ : Algebra R A''
a b : R
hx : AlgebraicIndependent R x
f : A →ₐ[R] A'
hfv : AlgebraicIndependent R (↑f ∘ x)
this : aeval (↑f ∘ x) = AlgHom.comp f (aeval x)
⊢ AlgebraicIndependent R x

tactic: exact hfv.of_comp
state_before: ι : Type u_4
ι' : Type ?u.331344
R : Type u_1
K : Type ?u.331350
A : Type u_2
A' : Type u_3
A'' : Type ?u.331359
V : Type u
V' : Type ?u.331364
x : ι → A
inst✝⁶ : CommRing R
inst✝⁵ : CommRing A
inst✝⁴ : CommRing A'
inst✝³ : CommRing A''
inst✝² : Algebra R A
inst✝¹ : Algebra R A'
inst✝ : Algebra R A''
a b : R
hx : AlgebraicIndependent R x
f : A →ₐ[R] A'
hfv : Injective (↑f ∘ ↑(aeval x))
this : aeval (↑f ∘ x) = AlgHom.comp f (aeval x)
⊢ AlgebraicIndependent R x

tactic: ext
state_before: ι : Type u_4
ι' : Type ?u.331344
R : Type u_1
K : Type ?u.331350
A : Type u_2
A' : Type u_3
A'' : Type ?u.331359
V : Type u
V' : Type ?u.331364
x : ι → A
inst✝⁶ : CommRing R
inst✝⁵ : CommRing A
inst✝⁴ : CommRing A'
inst✝³ : CommRing A''
inst✝² : Algebra R A
inst✝¹ : Algebra R A'
inst✝ : Algebra R A''
a b : R
hx : AlgebraicIndependent R x
f : A →ₐ[R] A'
hfv : AlgebraicIndependent R (↑f ∘ x)
⊢ aeval (↑f ∘ x) = AlgHom.comp f (aeval x)

tactic: simp
state_before: case hf
ι : Type u_4
ι' : Type ?u.331344
R : Type u_1
K : Type ?u.331350
A : Type u_2
A' : Type u_3
A'' : Type ?u.331359
V : Type u
V' : Type ?u.331364
x : ι → A
inst✝⁶ : CommRing R
inst✝⁵ : CommRing A
inst✝⁴ : CommRing A'
inst✝³ : CommRing A''
inst✝² : Algebra R A
inst✝¹ : Algebra R A'
inst✝ : Algebra R A''
a b : R
hx : AlgebraicIndependent R x
f : A →ₐ[R] A'
hfv : AlgebraicIndependent R (↑f ∘ x)
i✝ : ι
⊢ ↑(aeval (↑f ∘ x)) (X i✝) = ↑(AlgHom.comp f (aeval x)) (X i✝)
Theorem: Real.arccos_le_pi
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Inverse.lean

tactic: unfold arccos
state_before: x : ℝ
⊢ arccos x ≤ π

tactic: linarith [neg_pi_div_two_le_arcsin x]
state_before: x : ℝ
⊢ π / 2 - arcsin x ≤ π
Theorem: Order.Icc_succ_right
File: Mathlib/Order/SuccPred/Basic.lean

tactic: simp_rw [← Ici_inter_Iic, Iic_succ, inter_insert_of_mem (mem_Ici.2 h)]
state_before: α : Type u_1
inst✝¹ : PartialOrder α
inst✝ : SuccOrder α
a b : α
h : a ≤ succ b
⊢ Icc a (succ b) = insert (succ b) (Icc a b)
Theorem: Rel.interedges_empty_left
File: Mathlib/Combinatorics/SimpleGraph/Density.lean

tactic: rw [interedges, Finset.empty_product, filter_empty]
state_before: 𝕜 : Type ?u.2389
ι : Type ?u.2392
κ : Type ?u.2395
α : Type u_2
β : Type u_1
inst✝¹ : LinearOrderedField 𝕜
r : α → β → Prop
inst✝ : (a : α) → DecidablePred (r a)
s s₁ s₂ : Finset α
t✝ t₁ t₂ : Finset β
a : α
b : β
δ : 𝕜
t : Finset β
⊢ interedges r ∅ t = ∅
Theorem: Int.ofNat_le
File: Std/Data/Int/Lemmas.lean

tactic: rw [← hk]
state_before: m n : Nat
h : m ≤ n
k : Nat
hk : m + k = n
⊢ ↑m + ↑k = ↑n

tactic: rfl
state_before: m n : Nat
h : m ≤ n
k : Nat
hk : m + k = n
⊢ ↑m + ↑k = ↑(m + k)
Theorem: Function.Surjective.iSup_congr
File: Mathlib/Order/CompleteLattice.lean

tactic: convert h1.iSup_comp g
state_before: α : Type u_3
β : Type ?u.61579
β₂ : Type ?u.61582
γ : Type ?u.61585
ι : Sort u_1
ι' : Sort u_2
κ : ι → Sort ?u.61596
κ' : ι' → Sort ?u.61601
inst✝ : SupSet α
f g✝ : ι → α
g : ι' → α
h : ι → ι'
h1 : Surjective h
h2 : ∀ (x : ι), g (h x) = f x
⊢ (⨆ (x : ι), f x) = ⨆ (y : ι'), g y

tactic: exact (h2 _).symm
state_before: case h.e'_2.h.e'_4.h
α : Type u_3
β : Type ?u.61579
β₂ : Type ?u.61582
γ : Type ?u.61585
ι : Sort u_1
ι' : Sort u_2
κ : ι → Sort ?u.61596
κ' : ι' → Sort ?u.61601
inst✝ : SupSet α
f g✝ : ι → α
g : ι' → α
h : ι → ι'
h1 : Surjective h
h2 : ∀ (x : ι), g (h x) = f x
x✝ : ι
⊢ f x✝ = g (h x✝)
Theorem: Stream'.WSeq.exists_of_liftRel_right
File: Mathlib/Data/Seq/WSeq.lean

tactic: rw [← LiftRel.swap] at H
state_before: α : Type u
β : Type v
γ : Type w
R : α → β → Prop
s : WSeq α
t : WSeq β
H : LiftRel R s t
b : β
h : b ∈ t
⊢ ∃ a, a ∈ s ∧ R a b

tactic: exact exists_of_liftRel_left H h
state_before: α : Type u
β : Type v
γ : Type w
R : α → β → Prop
s : WSeq α
t : WSeq β
H : swap (LiftRel fun x y => R y x) s t
b : β
h : b ∈ t
⊢ ∃ a, a ∈ s ∧ R a b
Theorem: MeasureTheory.set_lintegral_const
File: Mathlib/MeasureTheory/Integral/Lebesgue.lean

tactic: rw [lintegral_const, Measure.restrict_apply_univ]
state_before: α : Type u_1
β : Type ?u.75567
γ : Type ?u.75570
δ : Type ?u.75573
m : MeasurableSpace α
μ ν : Measure α
s : Set α
c : ℝ≥0∞
⊢ (∫⁻ (x : α) in s, c ∂μ) = c * ↑↑μ s
Theorem: Complex.tendsto_normSq_cocompact_atTop
File: Mathlib/Analysis/Complex/Basic.lean

tactic: simpa [mul_self_abs]
using tendsto_abs_cocompact_atTop.atTop_mul_atTop tendsto_abs_cocompact_atTop
state_before: E : Type ?u.258402
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℂ E
⊢ Tendsto (↑normSq) (cocompact ℂ) atTop