tasksource/leandojo huggingface dataset:
Theorem: OrthonormalBasis.orthonormal_adjustToOrientation
File: Mathlib/Analysis/InnerProductSpace/Orientation.lean

tactic: apply e.orthonormal.orthonormal_of_forall_eq_or_eq_neg
state_before: E : Type u_1
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace ℝ E
ι : Type u_2
inst✝¹ : Fintype ι
inst✝ : DecidableEq ι
ne : Nonempty ι
e f : OrthonormalBasis ι ℝ E
x : Orientation ℝ E ι
⊢ Orthonormal ℝ ↑(Basis.adjustToOrientation (OrthonormalBasis.toBasis e) x)

tactic: simpa using e.toBasis.adjustToOrientation_apply_eq_or_eq_neg x
state_before: E : Type u_1
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace ℝ E
ι : Type u_2
inst✝¹ : Fintype ι
inst✝ : DecidableEq ι
ne : Nonempty ι
e f : OrthonormalBasis ι ℝ E
x : Orientation ℝ E ι
⊢ ∀ (i : ι),
    ↑(Basis.adjustToOrientation (OrthonormalBasis.toBasis e) x) i = ↑e i ∨
      ↑(Basis.adjustToOrientation (OrthonormalBasis.toBasis e) x) i = -↑e i
Theorem: Nat.gcdB_zero_right
File: Mathlib/Data/Int/GCD.lean

tactic: unfold gcdB xgcd
state_before: s : ℕ
h : s ≠ 0
⊢ gcdB s 0 = 0

tactic: obtain ⟨s, rfl⟩ := Nat.exists_eq_succ_of_ne_zero h
state_before: s : ℕ
h : s ≠ 0
⊢ (xgcdAux s 1 0 0 0 1).snd.snd = 0

tactic: rw [xgcdAux_succ]
state_before: case intro
s : ℕ
h : succ s ≠ 0
⊢ (xgcdAux (succ s) 1 0 0 0 1).snd.snd = 0

tactic: rfl
state_before: case intro
s : ℕ
h : succ s ≠ 0
⊢ (xgcdAux (0 % succ s) (0 - ↑0 / ↑(succ s) * 1) (1 - ↑0 / ↑(succ s) * 0) (succ s) 1 0).snd.snd = 0
Theorem: Option.bind_assoc
File: Std/Data/Option/Lemmas.lean

tactic: cases x <;> rfl
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
x : Option α
f : α → Option β
g : β → Option γ
⊢ Option.bind (Option.bind x f) g = Option.bind x fun y => Option.bind (f y) g
Theorem: zpow_induction_left
File: Mathlib/Algebra/GroupPower/Lemmas.lean

tactic: induction' n using Int.induction_on with n ih n ih
state_before: α : Type ?u.149471
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✝ : Group G
g : G
P : G → Prop
h_one : P 1
h_mul : ∀ (a : G), P a → P (g * a)
h_inv : ∀ (a : G), P a → P (g⁻¹ * a)
n : ℤ
⊢ P (g ^ n)

tactic: rwa [zpow_zero]
state_before: case hz
α : Type ?u.149471
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✝ : Group G
g : G
P : G → Prop
h_one : P 1
h_mul : ∀ (a : G), P a → P (g * a)
h_inv : ∀ (a : G), P a → P (g⁻¹ * a)
⊢ P (g ^ 0)

tactic: rw [add_comm, zpow_add, zpow_one]
state_before: case hp
α : Type ?u.149471
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✝ : Group G
g : G
P : G → Prop
h_one : P 1
h_mul : ∀ (a : G), P a → P (g * a)
h_inv : ∀ (a : G), P a → P (g⁻¹ * a)
n : ℕ
ih : P (g ^ ↑n)
⊢ P (g ^ (↑n + 1))

tactic: exact h_mul _ ih
state_before: case hp
α : Type ?u.149471
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✝ : Group G
g : G
P : G → Prop
h_one : P 1
h_mul : ∀ (a : G), P a → P (g * a)
h_inv : ∀ (a : G), P a → P (g⁻¹ * a)
n : ℕ
ih : P (g ^ ↑n)
⊢ P (g * g ^ ↑n)

tactic: rw [sub_eq_add_neg, add_comm, zpow_add, zpow_neg_one]
state_before: case hn
α : Type ?u.149471
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✝ : Group G
g : G
P : G → Prop
h_one : P 1
h_mul : ∀ (a : G), P a → P (g * a)
h_inv : ∀ (a : G), P a → P (g⁻¹ * a)
n : ℕ
ih : P (g ^ (-↑n))
⊢ P (g ^ (-↑n - 1))

tactic: exact h_inv _ ih
state_before: case hn
α : Type ?u.149471
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✝ : Group G
g : G
P : G → Prop
h_one : P 1
h_mul : ∀ (a : G), P a → P (g * a)
h_inv : ∀ (a : G), P a → P (g⁻¹ * a)
n : ℕ
ih : P (g ^ (-↑n))
⊢ P (g⁻¹ * g ^ (-↑n))
Theorem: Matrix.updateRow_subsingleton
File: Mathlib/Data/Matrix/Basic.lean

tactic: ext x y
state_before: l : Type ?u.1222192
m : Type u_1
n : Type u_2
o : Type ?u.1222201
m' : o → Type ?u.1222206
n' : o → Type ?u.1222211
R : Type u_3
S : Type ?u.1222217
α : Type v
β : Type w
γ : Type ?u.1222224
M : Matrix m n α
i✝ : m
j : n
b✝ : n → α
c : m → α
inst✝ : Subsingleton m
A : Matrix m n R
i : m
b : n → R
⊢ updateRow A i b = submatrix (row b) (Function.const m ()) id

tactic: simp [updateColumn_apply, Subsingleton.elim i x]
state_before: case a.h
l : Type ?u.1222192
m : Type u_1
n : Type u_2
o : Type ?u.1222201
m' : o → Type ?u.1222206
n' : o → Type ?u.1222211
R : Type u_3
S : Type ?u.1222217
α : Type v
β : Type w
γ : Type ?u.1222224
M : Matrix m n α
i✝ : m
j : n
b✝ : n → α
c : m → α
inst✝ : Subsingleton m
A : Matrix m n R
i : m
b : n → R
x : m
y : n
⊢ updateRow A i b x y = submatrix (row b) (Function.const m ()) id x y
Theorem: Polynomial.natTrailingDegree_mul_X_pow
File: Mathlib/Data/Polynomial/Degree/TrailingDegree.lean

tactic: apply le_antisymm
state_before: R : Type u
S : Type v
a b : R
n✝ m : ℕ
inst✝ : Semiring R
p✝ q r p : R[X]
hp : p ≠ 0
n : ℕ
⊢ natTrailingDegree (p * X ^ n) = natTrailingDegree p + n

tactic: refine' natTrailingDegree_le_of_ne_zero fun h => mt trailingCoeff_eq_zero.mp hp _
state_before: case a
R : Type u
S : Type v
a b : R
n✝ m : ℕ
inst✝ : Semiring R
p✝ q r p : R[X]
hp : p ≠ 0
n : ℕ
⊢ natTrailingDegree (p * X ^ n) ≤ natTrailingDegree p + n

tactic: rwa [trailingCoeff, ← coeff_mul_X_pow]
state_before: case a
R : Type u
S : Type v
a b : R
n✝ m : ℕ
inst✝ : Semiring R
p✝ q r p : R[X]
hp : p ≠ 0
n : ℕ
h : coeff (p * X ^ n) (natTrailingDegree p + n) = 0
⊢ trailingCoeff p = 0

tactic: rw [natTrailingDegree_eq_support_min' fun h => hp (mul_X_pow_eq_zero h), Finset.le_min'_iff]
state_before: case a
R : Type u
S : Type v
a b : R
n✝ m : ℕ
inst✝ : Semiring R
p✝ q r p : R[X]
hp : p ≠ 0
n : ℕ
⊢ natTrailingDegree p + n ≤ natTrailingDegree (p * X ^ n)

tactic: intro y hy
state_before: case a
R : Type u
S : Type v
a b : R
n✝ m : ℕ
inst✝ : Semiring R
p✝ q r p : R[X]
hp : p ≠ 0
n : ℕ
⊢ ∀ (y : ℕ), y ∈ support (p * X ^ n) → natTrailingDegree p + n ≤ y

tactic: have key : n ≤ y := by
  rw [mem_support_iff, coeff_mul_X_pow'] at hy
  exact by_contra fun h => hy (if_neg h)
state_before: case a
R : Type u
S : Type v
a b : R
n✝ m : ℕ
inst✝ : Semiring R
p✝ q r p : R[X]
hp : p ≠ 0
n y : ℕ
hy : y ∈ support (p * X ^ n)
⊢ natTrailingDegree p + n ≤ y

tactic: rw [mem_support_iff, coeff_mul_X_pow', if_pos key] at hy
state_before: case a
R : Type u
S : Type v
a b : R
n✝ m : ℕ
inst✝ : Semiring R
p✝ q r p : R[X]
hp : p ≠ 0
n y : ℕ
hy : y ∈ support (p * X ^ n)
key : n ≤ y
⊢ natTrailingDegree p + n ≤ y

tactic: exact (le_tsub_iff_right key).mp (natTrailingDegree_le_of_ne_zero hy)
state_before: case a
R : Type u
S : Type v
a b : R
n✝ m : ℕ
inst✝ : Semiring R
p✝ q r p : R[X]
hp : p ≠ 0
n y : ℕ
hy : coeff p (y - n) ≠ 0
key : n ≤ y
⊢ natTrailingDegree p + n ≤ y

tactic: rw [mem_support_iff, coeff_mul_X_pow'] at hy
state_before: R : Type u
S : Type v
a b : R
n✝ m : ℕ
inst✝ : Semiring R
p✝ q r p : R[X]
hp : p ≠ 0
n y : ℕ
hy : y ∈ support (p * X ^ n)
⊢ n ≤ y

tactic: exact by_contra fun h => hy (if_neg h)
state_before: R : Type u
S : Type v
a b : R
n✝ m : ℕ
inst✝ : Semiring R
p✝ q r p : R[X]
hp : p ≠ 0
n y : ℕ
hy : (if n ≤ y then coeff p (y - n) else 0) ≠ 0
⊢ n ≤ y
Theorem: Finset.lcm_union
File: Mathlib/Algebra/GCDMonoid/Finset.lean

tactic: rw [empty_union, lcm_empty, lcm_one_left, normalize_lcm]
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.6054
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : NormalizedGCDMonoid α
s s₁ s₂ : Finset β
f : β → α
inst✝ : DecidableEq β
⊢ lcm (∅ ∪ s₂) f = GCDMonoid.lcm (lcm ∅ f) (lcm s₂ f)

tactic: rw [insert_union, lcm_insert, lcm_insert, ih, lcm_assoc]
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.6054
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : NormalizedGCDMonoid α
s✝ s₁ s₂ : Finset β
f : β → α
inst✝ : DecidableEq β
a : β
s : Finset β
x✝ : ¬a ∈ s
ih : lcm (s ∪ s₂) f = GCDMonoid.lcm (lcm s f) (lcm s₂ f)
⊢ lcm (insert a s ∪ s₂) f = GCDMonoid.lcm (lcm (insert a s) f) (lcm s₂ f)
Theorem: Finset.powersetLen_eq_filter
File: Mathlib/Data/Finset/Powerset.lean

tactic: ext
state_before: α : Type u_1
s✝ t : Finset α
n : ℕ
s : Finset α
⊢ powersetLen n s = filter (fun x => card x = n) (powerset s)

tactic: simp [mem_powersetLen]
state_before: case a
α : Type u_1
s✝ t : Finset α
n : ℕ
s a✝ : Finset α
⊢ a✝ ∈ powersetLen n s ↔ a✝ ∈ filter (fun x => card x = n) (powerset s)
Theorem: AddCommGroup.modEq_iff_toIcoMod_eq_left
File: Mathlib/Algebra/Order/ToIntervalMod.lean

tactic: rintro ⟨n, rfl⟩
state_before: α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
hα : Archimedean α
p : α
hp : 0 < p
a b c : α
n : ℤ
⊢ (∃ z, b = a + z • p) → toIcoMod hp a b = a

tactic: rw [toIcoMod_add_zsmul, toIcoMod_apply_left]
state_before: case intro
α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
hα : Archimedean α
p : α
hp : 0 < p
a c : α
n✝ n : ℤ
⊢ toIcoMod hp a (a + n • p) = a
Theorem: EuclideanDomain.gcd_dvd
File: Mathlib/Algebra/EuclideanDomain/Basic.lean

tactic: rw [gcd_zero_left]
state_before: R : Type u
inst✝¹ : EuclideanDomain R
inst✝ : DecidableEq R
a b✝ b : R
⊢ gcd 0 b ∣ 0 ∧ gcd 0 b ∣ b

tactic: exact ⟨dvd_zero _, dvd_rfl⟩
state_before: R : Type u
inst✝¹ : EuclideanDomain R
inst✝ : DecidableEq R
a b✝ b : R
⊢ b ∣ 0 ∧ b ∣ b

tactic: rw [gcd_val]
state_before: R : Type u
inst✝¹ : EuclideanDomain R
inst✝ : DecidableEq R
a✝ b✝ a b : R
x✝¹ : a ≠ 0
x✝ : gcd (b % a) a ∣ b % a ∧ gcd (b % a) a ∣ a
IH₁ : gcd (b % a) a ∣ b % a
IH₂ : gcd (b % a) a ∣ a
⊢ gcd a b ∣ a ∧ gcd a b ∣ b

tactic: exact ⟨IH₂, (dvd_mod_iff IH₂).1 IH₁⟩
state_before: R : Type u
inst✝¹ : EuclideanDomain R
inst✝ : DecidableEq R
a✝ b✝ a b : R
x✝¹ : a ≠ 0
x✝ : gcd (b % a) a ∣ b % a ∧ gcd (b % a) a ∣ a
IH₁ : gcd (b % a) a ∣ b % a
IH₂ : gcd (b % a) a ∣ a
⊢ gcd (b % a) a ∣ a ∧ gcd (b % a) a ∣ b
Theorem: Real.iSup_mul_of_nonpos
File: Mathlib/Data/Real/Pointwise.lean

tactic: simp only [Real.mul_iSup_of_nonpos ha, mul_comm]
state_before: ι : Sort u_1
α : Type ?u.17270
inst✝ : LinearOrderedField α
r : ℝ
ha : r ≤ 0
f : ι → ℝ
⊢ (⨆ (i : ι), f i) * r = ⨅ (i : ι), f i * r
Theorem: Sym.card_sym_eq_choose
File: Mathlib/Data/Sym/Card.lean

tactic: rw [card_sym_eq_multichoose, Nat.multichoose_eq]
state_before: α✝ : Type ?u.55973
β : Type ?u.55976
n : ℕ
α : Type u_1
inst✝¹ : Fintype α
k : ℕ
inst✝ : Fintype (Sym α k)
⊢ Fintype.card (Sym α k) = Nat.choose (Fintype.card α + k - 1) k
Theorem: Nat.ofDigits_eq_foldr
File: Mathlib/Data/Nat/Digits.lean

tactic: induction' L with d L ih
state_before: n : ℕ
α : Type u_1
inst✝ : Semiring α
b : α
L : List ℕ
⊢ ofDigits b L = List.foldr (fun x y => ↑x + b * y) 0 L

tactic: rfl
state_before: case nil
n : ℕ
α : Type u_1
inst✝ : Semiring α
b : α
⊢ ofDigits b [] = List.foldr (fun x y => ↑x + b * y) 0 []

tactic: dsimp [ofDigits]
state_before: case cons
n : ℕ
α : Type u_1
inst✝ : Semiring α
b : α
d : ℕ
L : List ℕ
ih : ofDigits b L = List.foldr (fun x y => ↑x + b * y) 0 L
⊢ ofDigits b (d :: L) = List.foldr (fun x y => ↑x + b * y) 0 (d :: L)

tactic: rw [ih]
state_before: case cons
n : ℕ
α : Type u_1
inst✝ : Semiring α
b : α
d : ℕ
L : List ℕ
ih : ofDigits b L = List.foldr (fun x y => ↑x + b * y) 0 L
⊢ ↑d + b * ofDigits b L = ↑d + b * List.foldr (fun x y => ↑x + b * y) 0 L
Theorem: Asymptotics.SuperpolynomialDecay.param_mul
File: Mathlib/Analysis/Asymptotics/SuperpolynomialDecay.lean

tactic: simpa only [Set.mem_preimage, Pi.mul_apply, ← mul_assoc, ← pow_succ'] using hx
state_before: α : Type u_1
β : Type u_2
l : Filter α
k f g g' : α → β
inst✝¹ : TopologicalSpace β
inst✝ : CommSemiring β
hf : SuperpolynomialDecay l k f
z : ℕ
s : Set β
hs : IsOpen s
hs0 : 0 ∈ s
x : α
hx : x ∈ (fun a => k a ^ (z + 1) * f a) ⁻¹' s
⊢ x ∈ (fun a => k a ^ z * (k * f) a) ⁻¹' s
Theorem: IsClosed.union
File: Mathlib/Topology/Basic.lean

tactic: simpa only [← isOpen_compl_iff, compl_union] using IsOpen.inter
state_before: α : Type u
β : Type v
ι : Sort w
a : α
s s₁ s₂ t : Set α
p p₁ p₂ : α → Prop
inst✝ : TopologicalSpace α
⊢ IsClosed s₁ → IsClosed s₂ → IsClosed (s₁ ∪ s₂)
Theorem: MeasureTheory.measure_iUnion₀
File: Mathlib/MeasureTheory/Measure/NullMeasurable.lean

tactic: rcases exists_subordinate_pairwise_disjoint h hd with ⟨t, _ht_sub, ht_eq, htm, htd⟩
state_before: ι : Type u_1
α : Type u_2
β : Type ?u.11366
γ : Type ?u.11369
m0 : MeasurableSpace α
μ : Measure α
s t : Set α
inst✝ : Countable ι
f : ι → Set α
hd : Pairwise (AEDisjoint μ on f)
h : ∀ (i : ι), NullMeasurableSet (f i)
⊢ ↑↑μ (⋃ (i : ι), f i) = ∑' (i : ι), ↑↑μ (f i)

tactic: calc
  μ (⋃ i, f i) = μ (⋃ i, t i) := measure_congr (EventuallyEq.countable_iUnion ht_eq)
  _ = ∑' i, μ (t i) := (measure_iUnion htd htm)
  _ = ∑' i, μ (f i) := tsum_congr fun i => measure_congr (ht_eq _).symm
state_before: case intro.intro.intro.intro
ι : Type u_1
α : Type u_2
β : Type ?u.11366
γ : Type ?u.11369
m0 : MeasurableSpace α
μ : Measure α
s t✝ : Set α
inst✝ : Countable ι
f : ι → Set α
hd : Pairwise (AEDisjoint μ on f)
h : ∀ (i : ι), NullMeasurableSet (f i)
t : ι → Set α
_ht_sub : ∀ (i : ι), t i ⊆ f i
ht_eq : ∀ (i : ι), f i =ᵐ[μ] t i
htm : ∀ (i : ι), MeasurableSet (t i)
htd : Pairwise (Disjoint on t)
⊢ ↑↑μ (⋃ (i : ι), f i) = ∑' (i : ι), ↑↑μ (f i)
Theorem: MeasureTheory.lintegral_finset_sum_measure
File: Mathlib/MeasureTheory/Integral/Lebesgue.lean

tactic: rw [← Measure.sum_coe_finset, lintegral_sum_measure, ← Finset.tsum_subtype']
state_before: α : Type u_2
β : Type ?u.921513
γ : Type ?u.921516
δ : Type ?u.921519
m✝ : MeasurableSpace α
μ✝ ν : Measure α
ι : Type u_1
m : MeasurableSpace α
s : Finset ι
f : α → ℝ≥0∞
μ : ι → Measure α
⊢ (∫⁻ (a : α), f a ∂∑ i in s, μ i) = ∑ i in s, ∫⁻ (a : α), f a ∂μ i

tactic: rfl
state_before: α : Type u_2
β : Type ?u.921513
γ : Type ?u.921516
δ : Type ?u.921519
m✝ : MeasurableSpace α
μ✝ ν : Measure α
ι : Type u_1
m : MeasurableSpace α
s : Finset ι
f : α → ℝ≥0∞
μ : ι → Measure α
⊢ (∑' (i : { x // x ∈ s }), ∫⁻ (a : α), f a ∂μ ↑i) = ∑' (x : ↑↑s), ∫⁻ (a : α), f a ∂μ ↑x
Theorem: Ring.not_isField_iff_exists_ideal_bot_lt_and_lt_top
File: Mathlib/RingTheory/Ideal/Basic.lean

tactic: constructor
state_before: α : Type u
β : Type v
R : Type u_1
inst✝¹ : CommSemiring R
inst✝ : Nontrivial R
⊢ ¬IsField R ↔ ∃ I, ⊥ < I ∧ I < ⊤

tactic: intro h
state_before: case mp
α : Type u
β : Type v
R : Type u_1
inst✝¹ : CommSemiring R
inst✝ : Nontrivial R
⊢ ¬IsField R → ∃ I, ⊥ < I ∧ I < ⊤

tactic: obtain ⟨x, nz, nu⟩ := exists_not_isUnit_of_not_isField h
state_before: case mp
α : Type u
β : Type v
R : Type u_1
inst✝¹ : CommSemiring R
inst✝ : Nontrivial R
h : ¬IsField R
⊢ ∃ I, ⊥ < I ∧ I < ⊤

tactic: use Ideal.span {x}
state_before: case mp.intro.intro
α : Type u
β : Type v
R : Type u_1
inst✝¹ : CommSemiring R
inst✝ : Nontrivial R
h : ¬IsField R
x : R
nz : x ≠ 0
nu : ¬IsUnit x
⊢ ∃ I, ⊥ < I ∧ I < ⊤

tactic: rw [bot_lt_iff_ne_bot, lt_top_iff_ne_top]
state_before: case mp.intro.intro
α : Type u
β : Type v
R : Type u_1
inst✝¹ : CommSemiring R
inst✝ : Nontrivial R
h : ¬IsField R
x : R
nz : x ≠ 0
nu : ¬IsUnit x
⊢ ⊥ < Ideal.span {x} ∧ Ideal.span {x} < ⊤

tactic: exact ⟨mt Ideal.span_singleton_eq_bot.mp nz, mt Ideal.span_singleton_eq_top.mp nu⟩
state_before: case mp.intro.intro
α : Type u
β : Type v
R : Type u_1
inst✝¹ : CommSemiring R
inst✝ : Nontrivial R
h : ¬IsField R
x : R
nz : x ≠ 0
nu : ¬IsUnit x
⊢ Ideal.span {x} ≠ ⊥ ∧ Ideal.span {x} ≠ ⊤

tactic: rintro ⟨I, bot_lt, lt_top⟩ hf
state_before: case mpr
α : Type u
β : Type v
R : Type u_1
inst✝¹ : CommSemiring R
inst✝ : Nontrivial R
⊢ (∃ I, ⊥ < I ∧ I < ⊤) → ¬IsField R

tactic: obtain ⟨x, mem, ne_zero⟩ := SetLike.exists_of_lt bot_lt
state_before: case mpr.intro.intro
α : Type u
β : Type v
R : Type u_1
inst✝¹ : CommSemiring R
inst✝ : Nontrivial R
I : Ideal R
bot_lt : ⊥ < I
lt_top : I < ⊤
hf : IsField R
⊢ False

tactic: rw [Submodule.mem_bot] at ne_zero
state_before: case mpr.intro.intro.intro.intro
α : Type u
β : Type v
R : Type u_1
inst✝¹ : CommSemiring R
inst✝ : Nontrivial R
I : Ideal R
bot_lt : ⊥ < I
lt_top : I < ⊤
hf : IsField R
x : R
mem : x ∈ I
ne_zero : ¬x ∈ ⊥
⊢ False

tactic: obtain ⟨y, hy⟩ := hf.mul_inv_cancel ne_zero
state_before: case mpr.intro.intro.intro.intro
α : Type u
β : Type v
R : Type u_1
inst✝¹ : CommSemiring R
inst✝ : Nontrivial R
I : Ideal R
bot_lt : ⊥ < I
lt_top : I < ⊤
hf : IsField R
x : R
mem : x ∈ I
ne_zero : ¬x = 0
⊢ False

tactic: rw [lt_top_iff_ne_top, Ne.def, Ideal.eq_top_iff_one, ← hy] at lt_top
state_before: case mpr.intro.intro.intro.intro.intro
α : Type u
β : Type v
R : Type u_1
inst✝¹ : CommSemiring R
inst✝ : Nontrivial R
I : Ideal R
bot_lt : ⊥ < I
lt_top : I < ⊤
hf : IsField R
x : R
mem : x ∈ I
ne_zero : ¬x = 0
y : R
hy : x * y = 1
⊢ False

tactic: exact lt_top (I.mul_mem_right _ mem)
state_before: case mpr.intro.intro.intro.intro.intro
α : Type u
β : Type v
R : Type u_1
inst✝¹ : CommSemiring R
inst✝ : Nontrivial R
I : Ideal R
bot_lt : ⊥ < I
hf : IsField R
x : R
mem : x ∈ I
ne_zero : ¬x = 0
y : R
lt_top : ¬x * y ∈ I
hy : x * y = 1
⊢ False
Theorem: Function.Embedding.equiv_of_fintype_self_embedding_to_embedding
File: Mathlib/Data/Fintype/Card.lean

tactic: ext
state_before: α : Type u_1
β : Type ?u.48925
γ : Type ?u.48928
inst✝ : Finite α
e : α ↪ α
⊢ Equiv.toEmbedding (equivOfFintypeSelfEmbedding e) = e

tactic: rfl
state_before: case h
α : Type u_1
β : Type ?u.48925
γ : Type ?u.48928
inst✝ : Finite α
e : α ↪ α
x✝ : α
⊢ ↑(Equiv.toEmbedding (equivOfFintypeSelfEmbedding e)) x✝ = ↑e x✝
Theorem: Finset.prod_hom_rel
File: Mathlib/Algebra/BigOperators/Basic.lean

tactic: delta Finset.prod
state_before: ι : Type ?u.327698
β : Type u
α : Type v
γ : Type w
s✝ s₁ s₂ : Finset α
a : α
f✝ g✝ : α → β
inst✝¹ : CommMonoid β
inst✝ : CommMonoid γ
r : β → γ → Prop
f : α → β
g : α → γ
s : Finset α
h₁ : r 1 1
h₂ : ∀ (a : α) (b : β) (c : γ), r b c → r (f a * b) (g a * c)
⊢ r (∏ x in s, f x) (∏ x in s, g x)

tactic: apply Multiset.prod_hom_rel <;> assumption
state_before: ι : Type ?u.327698
β : Type u
α : Type v
γ : Type w
s✝ s₁ s₂ : Finset α
a : α
f✝ g✝ : α → β
inst✝¹ : CommMonoid β
inst✝ : CommMonoid γ
r : β → γ → Prop
f : α → β
g : α → γ
s : Finset α
h₁ : r 1 1
h₂ : ∀ (a : α) (b : β) (c : γ), r b c → r (f a * b) (g a * c)
⊢ r (Multiset.prod (Multiset.map (fun x => f x) s.val)) (Multiset.prod (Multiset.map (fun x => g x) s.val))
Theorem: Option.bind_map_comm
File: Std/Data/Option/Lemmas.lean

tactic: cases x <;> simp
state_before: α : Type u_1
β : Type u_2
x : Option (Option α)
f : α → β
⊢ Option.bind x (Option.map f) = Option.bind (Option.map (Option.map f) x) id
Theorem: Primrec.nat_strong_rec
File: Mathlib/Computability/Primrec.lean

tactic: simp [List.get?_range (Nat.lt_succ_self n)]
state_before: α : Type u_2
β : Type ?u.320238
γ : Type ?u.320241
σ : Type u_1
inst✝³ : Primcodable α
inst✝² : Primcodable β
inst✝¹ : Primcodable γ
inst✝ : Primcodable σ
f : α → ℕ → σ
g : α → List σ → Option σ
hg : Primrec₂ g
H : ∀ (a : α) (n : ℕ), g a (List.map (f a) (List.range n)) = some (f a n)
this : Primrec₂ fun a n => List.map (f a) (List.range n)
a : α
n : ℕ
⊢ List.get? (List.map (f (a, n).fst) (List.range (Nat.succ (a, n).snd))) (a, n).snd = some (f a n)

tactic: simp
state_before: α : Type u_2
β : Type ?u.320238
γ : Type ?u.320241
σ : Type u_1
inst✝³ : Primcodable α
inst✝² : Primcodable β
inst✝¹ : Primcodable γ
inst✝ : Primcodable σ
f : α → ℕ → σ
g : α → List σ → Option σ
hg : Primrec₂ g
H : ∀ (a : α) (n : ℕ), g a (List.map (f a) (List.range n)) = some (f a n)
a : α
n : ℕ
⊢ Nat.rec (some [])
      (fun n IH =>
        Option.bind (a, n, IH).snd.snd fun b =>
          Option.map (fun b_1 => (((a, n, IH), b), b_1).fst.snd ++ [(((a, n, IH), b), b_1).snd])
            (g ((a, n, IH), b).fst.fst ((a, n, IH), b).snd))
      n =
    some (List.map (f a) (List.range n))

tactic: induction' n with n IH
state_before: α : Type u_2
β : Type ?u.320238
γ : Type ?u.320241
σ : Type u_1
inst✝³ : Primcodable α
inst✝² : Primcodable β
inst✝¹ : Primcodable γ
inst✝ : Primcodable σ
f : α → ℕ → σ
g : α → List σ → Option σ
hg : Primrec₂ g
H : ∀ (a : α) (n : ℕ), g a (List.map (f a) (List.range n)) = some (f a n)
a : α
n : ℕ
⊢ Nat.rec (some []) (fun n IH => Option.bind IH fun b => Option.map (fun b_1 => b ++ [b_1]) (g a b)) n =
    some (List.map (f a) (List.range n))

tactic: simp [IH, H, List.range_succ]
state_before: case succ
α : Type u_2
β : Type ?u.320238
γ : Type ?u.320241
σ : Type u_1
inst✝³ : Primcodable α
inst✝² : Primcodable β
inst✝¹ : Primcodable γ
inst✝ : Primcodable σ
f : α → ℕ → σ
g : α → List σ → Option σ
hg : Primrec₂ g
H : ∀ (a : α) (n : ℕ), g a (List.map (f a) (List.range n)) = some (f a n)
a : α
n : ℕ
IH :
  Nat.rec (some []) (fun n IH => Option.bind IH fun b => Option.map (fun b_1 => b ++ [b_1]) (g a b)) n =
    some (List.map (f a) (List.range n))
⊢ Nat.rec (some []) (fun n IH => Option.bind IH fun b => Option.map (fun b_1 => b ++ [b_1]) (g a b)) (Nat.succ n) =
    some (List.map (f a) (List.range (Nat.succ n)))

tactic: rfl
state_before: case zero
α : Type u_2
β : Type ?u.320238
γ : Type ?u.320241
σ : Type u_1
inst✝³ : Primcodable α
inst✝² : Primcodable β
inst✝¹ : Primcodable γ
inst✝ : Primcodable σ
f : α → ℕ → σ
g : α → List σ → Option σ
hg : Primrec₂ g
H : ∀ (a : α) (n : ℕ), g a (List.map (f a) (List.range n)) = some (f a n)
a : α
⊢ Nat.rec (some []) (fun n IH => Option.bind IH fun b => Option.map (fun b_1 => b ++ [b_1]) (g a b)) Nat.zero =
    some (List.map (f a) (List.range Nat.zero))
Theorem: Mathlib.Tactic.Abel.term_smulg
File: Mathlib/Tactic/Abel.lean

tactic: simp [h₂.symm, h₁.symm, termg, smulg, zsmul_add, mul_zsmul]
state_before: α : Type u_1
inst✝ : AddCommGroup α
c n : ℤ
x a : α
n' : ℤ
a' : α
h₁ : c * n = n'
h₂ : smulg c a = a'
⊢ smulg c (termg n x a) = termg n' x a'
Theorem: div_lt_div_iff_left
File: Mathlib/Algebra/Order/Group/Defs.lean

tactic: rw [div_eq_mul_inv, div_eq_mul_inv, ← mul_lt_mul_iff_left a⁻¹, inv_mul_cancel_left,
  inv_mul_cancel_left, inv_lt_inv_iff]
state_before: α : Type u
inst✝³ : Group α
inst✝² : LT α
inst✝¹ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x < x_1
inst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x < x_1
a✝ b c a : α
⊢ a / b < a / c ↔ c < b
Theorem: MvPolynomial.rename_comp_bind₁
File: Mathlib/Data/MvPolynomial/Monad.lean

tactic: ext1 i
state_before: σ : Type u_4
τ : Type u_2
R : Type u_3
S : Type ?u.503174
T : Type ?u.503177
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S
inst✝ : CommSemiring T
f✝ : σ → MvPolynomial τ R
υ : Type u_1
f : σ → MvPolynomial τ R
g : τ → υ
⊢ AlgHom.comp (rename g) (bind₁ f) = bind₁ fun i => ↑(rename g) (f i)

tactic: simp
state_before: case hf
σ : Type u_4
τ : Type u_2
R : Type u_3
S : Type ?u.503174
T : Type ?u.503177
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S
inst✝ : CommSemiring T
f✝ : σ → MvPolynomial τ R
υ : Type u_1
f : σ → MvPolynomial τ R
g : τ → υ
i : σ
⊢ ↑(AlgHom.comp (rename g) (bind₁ f)) (X i) = ↑(bind₁ fun i => ↑(rename g) (f i)) (X i)
Theorem: Bool.true_eq_false_eq_False
File: Mathlib/Init/Data/Bool/Lemmas.lean

tactic: decide
state_before: ⊢ ¬true = false
Theorem: MvPolynomial.ker_evalₗ
File: Mathlib/FieldTheory/Finite/Polynomial.lean

tactic: cases nonempty_fintype σ
state_before: σ K : Type u
inst✝² : Fintype K
inst✝¹ : Field K
inst✝ : Finite σ
⊢ ker (evalᵢ σ K) = ⊥

tactic: refine' (ker_eq_bot_iff_range_eq_top_of_finrank_eq_finrank _).mpr (range_evalᵢ σ K)
state_before: case intro
σ K : Type u
inst✝² : Fintype K
inst✝¹ : Field K
inst✝ : Finite σ
val✝ : Fintype σ
⊢ ker (evalᵢ σ K) = ⊥

tactic: rw [FiniteDimensional.finrank_fintype_fun_eq_card, finrank_R]
state_before: case intro
σ K : Type u
inst✝² : Fintype K
inst✝¹ : Field K
inst✝ : Finite σ
val✝ : Fintype σ
⊢ FiniteDimensional.finrank K (R σ K) = FiniteDimensional.finrank K ((σ → K) → K)
Theorem: Matrix.smul_mul
File: Mathlib/Data/Matrix/Basic.lean

tactic: ext
state_before: l : Type u_4
m : Type u_3
n : Type u_1
o : Type ?u.251620
m' : o → Type ?u.251625
n' : o → Type ?u.251630
R : Type u_2
S : Type ?u.251636
α : Type v
β : Type w
γ : Type ?u.251643
inst✝⁵ : AddCommMonoid α
inst✝⁴ : Mul α
inst✝³ : Fintype n
inst✝² : Monoid R
inst✝¹ : DistribMulAction R α
inst✝ : IsScalarTower R α α
a : R
M : Matrix m n α
N : Matrix n l α
⊢ (a • M) ⬝ N = a • M ⬝ N

tactic: apply smul_dotProduct
state_before: case a.h
l : Type u_4
m : Type u_3
n : Type u_1
o : Type ?u.251620
m' : o → Type ?u.251625
n' : o → Type ?u.251630
R : Type u_2
S : Type ?u.251636
α : Type v
β : Type w
γ : Type ?u.251643
inst✝⁵ : AddCommMonoid α
inst✝⁴ : Mul α
inst✝³ : Fintype n
inst✝² : Monoid R
inst✝¹ : DistribMulAction R α
inst✝ : IsScalarTower R α α
a : R
M : Matrix m n α
N : Matrix n l α
i✝ : m
x✝ : l
⊢ ((a • M) ⬝ N) i✝ x✝ = (a • M ⬝ N) i✝ x✝