data.polynomial.partial_fractions
⟷
Mathlib.Data.Polynomial.PartialFractions
The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(last sync)
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -3,7 +3,7 @@ Copyright (c) Sidharth Hariharan. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kevin Buzzard, Sidharth Hariharan
-/
-import Data.Polynomial.Div
+import Algebra.Polynomial.Div
import Data.ZMod.Basic
import Logic.Function.Basic
import RingTheory.Localization.FractionRing
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kevin Buzzard, Sidharth Hariharan
-/
import Data.Polynomial.Div
-import Data.Zmod.Basic
+import Data.ZMod.Basic
import Logic.Function.Basic
import RingTheory.Localization.FractionRing
import Tactic.FieldSimp
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -117,7 +117,7 @@ theorem div_eq_quo_add_sum_rem_div (f : R[X]) {ι : Type _} {g : ι → R[X]} {s
norm_cast at hf IH ⊢
rw [Finset.prod_insert hab, hf, IH, Finset.sum_insert hab, if_pos rfl]
trans (↑(q₀ + q : R[X]) : K) + (↑r₁ / ↑(g a) + ∑ i : ι in b, ↑(r i) / ↑(g i))
- · push_cast ; ring
+ · push_cast; ring
congr 2
refine' Finset.sum_congr rfl fun x hxb => _
rw [if_neg]
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,12 +3,12 @@ Copyright (c) Sidharth Hariharan. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kevin Buzzard, Sidharth Hariharan
-/
-import Mathbin.Data.Polynomial.Div
-import Mathbin.Data.Zmod.Basic
-import Mathbin.Logic.Function.Basic
-import Mathbin.RingTheory.Localization.FractionRing
-import Mathbin.Tactic.FieldSimp
-import Mathbin.Tactic.LinearCombination
+import Data.Polynomial.Div
+import Data.Zmod.Basic
+import Logic.Function.Basic
+import RingTheory.Localization.FractionRing
+import Tactic.FieldSimp
+import Tactic.LinearCombination
#align_import data.polynomial.partial_fractions from "leanprover-community/mathlib"@"31ca6f9cf5f90a6206092cd7f84b359dcb6d52e0"
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,11 +2,6 @@
Copyright (c) Sidharth Hariharan. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kevin Buzzard, Sidharth Hariharan
-
-! This file was ported from Lean 3 source module data.polynomial.partial_fractions
-! leanprover-community/mathlib commit 31ca6f9cf5f90a6206092cd7f84b359dcb6d52e0
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.Data.Polynomial.Div
import Mathbin.Data.Zmod.Basic
@@ -15,6 +10,8 @@ import Mathbin.RingTheory.Localization.FractionRing
import Mathbin.Tactic.FieldSimp
import Mathbin.Tactic.LinearCombination
+#align_import data.polynomial.partial_fractions from "leanprover-community/mathlib"@"31ca6f9cf5f90a6206092cd7f84b359dcb6d52e0"
+
/-!
# Partial fractions
mathlib commit https://github.com/leanprover-community/mathlib/commit/9fb8964792b4237dac6200193a0d533f1b3f7423
@@ -59,6 +59,7 @@ variable (K : Type) [Field K] [Algebra R[X] K] [IsFractionRing R[X] K]
section TwoDenominators
+#print div_eq_quo_add_rem_div_add_rem_div /-
/-- Let R be an integral domain and f, g₁, g₂ ∈ R[X]. Let g₁ and g₂ be monic and coprime.
Then, ∃ q, r₁, r₂ ∈ R[X] such that f / g₁g₂ = q + r₁/g₁ + r₂/g₂ and deg(r₁) < deg(g₁) and
deg(r₂) < deg(g₂).
@@ -81,6 +82,7 @@ theorem div_eq_quo_add_rem_div_add_rem_div (f : R[X]) {g₁ g₂ : R[X]} (hg₁
norm_cast
linear_combination -1 * f * hcd + -1 * g₁ * hfc + -1 * g₂ * hfd
#align div_eq_quo_add_rem_div_add_rem_div div_eq_quo_add_rem_div_add_rem_div
+-/
end TwoDenominators
@@ -88,6 +90,7 @@ section NDenominators
open scoped BigOperators Classical
+#print div_eq_quo_add_sum_rem_div /-
/-- Let R be an integral domain and f ∈ R[X]. Let s be a finite index set.
Then, a fraction of the form f / ∏ (g i) can be rewritten as q + ∑ (r i) / (g i), where
deg(r i) < deg(g i), provided that the g i are monic and pairwise coprime.
@@ -132,6 +135,7 @@ theorem div_eq_quo_add_sum_rem_div (f : R[X]) {ι : Type _} {g : ι → R[X]} {s
rintro rfl
exact hab hi
#align div_eq_quo_add_sum_rem_div div_eq_quo_add_sum_rem_div
+-/
end NDenominators
mathlib commit https://github.com/leanprover-community/mathlib/commit/a3e83f0fa4391c8740f7d773a7a9b74e311ae2a3
@@ -96,7 +96,7 @@ theorem div_eq_quo_add_sum_rem_div (f : R[X]) {ι : Type _} {g : ι → R[X]} {s
(hg : ∀ i ∈ s, (g i).Monic) (hcop : Set.Pairwise ↑s fun i j => IsCoprime (g i) (g j)) :
∃ (q : R[X]) (r : ι → R[X]),
(∀ i ∈ s, (r i).degree < (g i).degree) ∧
- ((↑f : K) / ∏ i in s, ↑(g i)) = ↑q + ∑ i in s, ↑(r i) / ↑(g i) :=
+ (↑f : K) / ∏ i in s, ↑(g i) = ↑q + ∑ i in s, ↑(r i) / ↑(g i) :=
by
induction' s using Finset.induction_on with a b hab Hind f generalizing f
· refine' ⟨f, fun i : ι => (0 : R[X]), fun i => _, by simp⟩
mathlib commit https://github.com/leanprover-community/mathlib/commit/5f25c089cb34db4db112556f23c50d12da81b297
@@ -114,7 +114,7 @@ theorem div_eq_quo_add_sum_rem_div (f : R[X]) {ι : Type _} {g : ι → R[X]} {s
exact hdeg₁
· intro hi
exact hrdeg i (Finset.mem_of_mem_insert_of_ne hi h1)
- norm_cast at hf IH ⊢
+ norm_cast at hf IH ⊢
rw [Finset.prod_insert hab, hf, IH, Finset.sum_insert hab, if_pos rfl]
trans (↑(q₀ + q : R[X]) : K) + (↑r₁ / ↑(g a) + ∑ i : ι in b, ↑(r i) / ↑(g i))
· push_cast ; ring
mathlib commit https://github.com/leanprover-community/mathlib/commit/cca40788df1b8755d5baf17ab2f27dacc2e17acb
@@ -94,7 +94,7 @@ deg(r i) < deg(g i), provided that the g i are monic and pairwise coprime.
-/
theorem div_eq_quo_add_sum_rem_div (f : R[X]) {ι : Type _} {g : ι → R[X]} {s : Finset ι}
(hg : ∀ i ∈ s, (g i).Monic) (hcop : Set.Pairwise ↑s fun i j => IsCoprime (g i) (g j)) :
- ∃ (q : R[X])(r : ι → R[X]),
+ ∃ (q : R[X]) (r : ι → R[X]),
(∀ i ∈ s, (r i).degree < (g i).degree) ∧
((↑f : K) / ∏ i in s, ↑(g i)) = ↑q + ∑ i in s, ↑(r i) / ↑(g i) :=
by
@@ -114,7 +114,7 @@ theorem div_eq_quo_add_sum_rem_div (f : R[X]) {ι : Type _} {g : ι → R[X]} {s
exact hdeg₁
· intro hi
exact hrdeg i (Finset.mem_of_mem_insert_of_ne hi h1)
- norm_cast at hf IH⊢
+ norm_cast at hf IH ⊢
rw [Finset.prod_insert hab, hf, IH, Finset.sum_insert hab, if_pos rfl]
trans (↑(q₀ + q : R[X]) : K) + (↑r₁ / ↑(g a) + ∑ i : ι in b, ↑(r i) / ↑(g i))
· push_cast ; ring
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -51,7 +51,7 @@ of Patrick Massot.
variable (R : Type) [CommRing R] [IsDomain R]
-open Polynomial
+open scoped Polynomial
open Polynomial
@@ -86,7 +86,7 @@ end TwoDenominators
section NDenominators
-open BigOperators Classical
+open scoped BigOperators Classical
/-- Let R be an integral domain and f ∈ R[X]. Let s be a finite index set.
Then, a fraction of the form f / ∏ (g i) can be rewritten as q + ∑ (r i) / (g i), where
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -59,9 +59,6 @@ variable (K : Type) [Field K] [Algebra R[X] K] [IsFractionRing R[X] K]
section TwoDenominators
-/- warning: div_eq_quo_add_rem_div_add_rem_div -> div_eq_quo_add_rem_div_add_rem_div is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align div_eq_quo_add_rem_div_add_rem_div div_eq_quo_add_rem_div_add_rem_divₓ'. -/
/-- Let R be an integral domain and f, g₁, g₂ ∈ R[X]. Let g₁ and g₂ be monic and coprime.
Then, ∃ q, r₁, r₂ ∈ R[X] such that f / g₁g₂ = q + r₁/g₁ + r₂/g₂ and deg(r₁) < deg(g₁) and
deg(r₂) < deg(g₂).
@@ -91,9 +88,6 @@ section NDenominators
open BigOperators Classical
-/- warning: div_eq_quo_add_sum_rem_div -> div_eq_quo_add_sum_rem_div is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align div_eq_quo_add_sum_rem_div div_eq_quo_add_sum_rem_divₓ'. -/
/-- Let R be an integral domain and f ∈ R[X]. Let s be a finite index set.
Then, a fraction of the form f / ∏ (g i) can be rewritten as q + ∑ (r i) / (g i), where
deg(r i) < deg(g i), provided that the g i are monic and pairwise coprime.
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -76,12 +76,8 @@ theorem div_eq_quo_add_rem_div_add_rem_div (f : R[X]) {g₁ g₂ : R[X]} (hg₁
refine'
⟨f * d /ₘ g₁ + f * c /ₘ g₂, f * d %ₘ g₁, f * c %ₘ g₂, degree_mod_by_monic_lt _ hg₁,
degree_mod_by_monic_lt _ hg₂, _⟩
- have hg₁' : (↑g₁ : K) ≠ 0 := by
- norm_cast
- exact hg₁.ne_zero_of_ne zero_ne_one
- have hg₂' : (↑g₂ : K) ≠ 0 := by
- norm_cast
- exact hg₂.ne_zero_of_ne zero_ne_one
+ have hg₁' : (↑g₁ : K) ≠ 0 := by norm_cast; exact hg₁.ne_zero_of_ne zero_ne_one
+ have hg₂' : (↑g₂ : K) ≠ 0 := by norm_cast; exact hg₂.ne_zero_of_ne zero_ne_one
have hfc := mod_by_monic_add_div (f * c) hg₂
have hfd := mod_by_monic_add_div (f * d) hg₁
field_simp
@@ -127,8 +123,7 @@ theorem div_eq_quo_add_sum_rem_div (f : R[X]) {ι : Type _} {g : ι → R[X]} {s
norm_cast at hf IH⊢
rw [Finset.prod_insert hab, hf, IH, Finset.sum_insert hab, if_pos rfl]
trans (↑(q₀ + q : R[X]) : K) + (↑r₁ / ↑(g a) + ∑ i : ι in b, ↑(r i) / ↑(g i))
- · push_cast
- ring
+ · push_cast ; ring
congr 2
refine' Finset.sum_congr rfl fun x hxb => _
rw [if_neg]
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -60,10 +60,7 @@ variable (K : Type) [Field K] [Algebra R[X] K] [IsFractionRing R[X] K]
section TwoDenominators
/- warning: div_eq_quo_add_rem_div_add_rem_div -> div_eq_quo_add_rem_div_add_rem_div is a dubious translation:
-lean 3 declaration is
- forall (R : Type) [_inst_1 : CommRing.{0} R] [_inst_2 : IsDomain.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))] (K : Type) [_inst_3 : Field.{0} K] [_inst_4 : Algebra.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3)))] [_inst_5 : IsFractionRing.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) (Polynomial.commRing.{0} R _inst_1) K (Field.toCommRing.{0} K _inst_3) _inst_4] (f : Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) {g₁ : Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))} {g₂ : Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))}, (Polynomial.Monic.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)) g₁) -> (Polynomial.Monic.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)) g₂) -> (IsCoprime.{0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) g₁ g₂) -> (Exists.{1} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) (fun (q : Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) => Exists.{1} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) (fun (r₁ : Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) => Exists.{1} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) (fun (r₂ : Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) => And (LT.lt.{0} (WithBot.{0} Nat) (Preorder.toHasLt.{0} (WithBot.{0} Nat) (WithBot.preorder.{0} Nat (PartialOrder.toPreorder.{0} Nat (OrderedCancelAddCommMonoid.toPartialOrder.{0} Nat (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{0} Nat Nat.strictOrderedSemiring))))) (Polynomial.degree.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)) r₁) (Polynomial.degree.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)) g₁)) (And (LT.lt.{0} (WithBot.{0} Nat) (Preorder.toHasLt.{0} (WithBot.{0} Nat) (WithBot.preorder.{0} Nat (PartialOrder.toPreorder.{0} Nat (OrderedCancelAddCommMonoid.toPartialOrder.{0} Nat (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{0} Nat Nat.strictOrderedSemiring))))) (Polynomial.degree.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)) r₂) (Polynomial.degree.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)) g₂)) (Eq.{1} K (HDiv.hDiv.{0, 0, 0} K K K (instHDiv.{0} K (DivInvMonoid.toHasDiv.{0} K (DivisionRing.toDivInvMonoid.{0} K (Field.toDivisionRing.{0} K _inst_3)))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (algebraMap.coeHTCT.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))) _inst_4) f) (HMul.hMul.{0, 0, 0} K K K (instHMul.{0} K (Distrib.toHasMul.{0} K (Ring.toDistrib.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (algebraMap.coeHTCT.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))) _inst_4) g₁) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (algebraMap.coeHTCT.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))) _inst_4) g₂))) (HAdd.hAdd.{0, 0, 0} K K K (instHAdd.{0} K (Distrib.toHasAdd.{0} K (Ring.toDistrib.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))))) (HAdd.hAdd.{0, 0, 0} K K K (instHAdd.{0} K (Distrib.toHasAdd.{0} K (Ring.toDistrib.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (algebraMap.coeHTCT.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))) _inst_4) q) (HDiv.hDiv.{0, 0, 0} K K K (instHDiv.{0} K (DivInvMonoid.toHasDiv.{0} K (DivisionRing.toDivInvMonoid.{0} K (Field.toDivisionRing.{0} K _inst_3)))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (algebraMap.coeHTCT.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))) _inst_4) r₁) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (algebraMap.coeHTCT.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))) _inst_4) g₁))) (HDiv.hDiv.{0, 0, 0} K K K (instHDiv.{0} K (DivInvMonoid.toHasDiv.{0} K (DivisionRing.toDivInvMonoid.{0} K (Field.toDivisionRing.{0} K _inst_3)))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (algebraMap.coeHTCT.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))) _inst_4) r₂) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (algebraMap.coeHTCT.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))) _inst_4) g₂)))))))))
-but is expected to have type
- forall (R : Type) [_inst_1 : CommRing.{0} R] [_inst_2 : IsDomain.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))] (K : Type) [_inst_3 : Field.{0} K] [_inst_4 : Algebra.{0, 0} (Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_3)))] [_inst_5 : IsFractionRing.{0, 0} (Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) (Polynomial.commRing.{0} R _inst_1) K (Field.toCommRing.{0} K _inst_3) _inst_4] (f : Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) {g₁ : Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))} {g₂ : Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))}, (Polynomial.Monic.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) g₁) -> (Polynomial.Monic.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) g₂) -> (IsCoprime.{0} (Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) g₁ g₂) -> (Exists.{1} (Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) (fun (q : Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) => Exists.{1} (Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) (fun (r₁ : Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) => Exists.{1} (Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) (fun (r₂ : Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) => And (LT.lt.{0} (WithBot.{0} Nat) (Preorder.toLT.{0} (WithBot.{0} Nat) (WithBot.preorder.{0} Nat (PartialOrder.toPreorder.{0} Nat (StrictOrderedSemiring.toPartialOrder.{0} Nat Nat.strictOrderedSemiring)))) (Polynomial.degree.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) r₁) (Polynomial.degree.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) g₁)) (And (LT.lt.{0} (WithBot.{0} Nat) (Preorder.toLT.{0} (WithBot.{0} Nat) (WithBot.preorder.{0} Nat (PartialOrder.toPreorder.{0} Nat (StrictOrderedSemiring.toPartialOrder.{0} Nat Nat.strictOrderedSemiring)))) (Polynomial.degree.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) r₂) (Polynomial.degree.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) g₂)) (Eq.{1} K (HDiv.hDiv.{0, 0, 0} K K K (instHDiv.{0} K (Field.toDiv.{0} K _inst_3)) (Algebra.cast.{0, 0} (Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_3))) _inst_4 f) (HMul.hMul.{0, 0, 0} K K K (instHMul.{0} K (NonUnitalNonAssocRing.toMul.{0} K (NonAssocRing.toNonUnitalNonAssocRing.{0} K (Ring.toNonAssocRing.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3)))))) (Algebra.cast.{0, 0} (Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_3))) _inst_4 g₁) (Algebra.cast.{0, 0} (Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_3))) _inst_4 g₂))) (HAdd.hAdd.{0, 0, 0} K K K (instHAdd.{0} K (Distrib.toAdd.{0} K (NonUnitalNonAssocSemiring.toDistrib.{0} K (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{0} K (NonAssocRing.toNonUnitalNonAssocRing.{0} K (Ring.toNonAssocRing.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3)))))))) (HAdd.hAdd.{0, 0, 0} K K K (instHAdd.{0} K (Distrib.toAdd.{0} K (NonUnitalNonAssocSemiring.toDistrib.{0} K (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{0} K (NonAssocRing.toNonUnitalNonAssocRing.{0} K (Ring.toNonAssocRing.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3)))))))) (Algebra.cast.{0, 0} (Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_3))) _inst_4 q) (HDiv.hDiv.{0, 0, 0} K K K (instHDiv.{0} K (Field.toDiv.{0} K _inst_3)) (Algebra.cast.{0, 0} (Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_3))) _inst_4 r₁) (Algebra.cast.{0, 0} (Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_3))) _inst_4 g₁))) (HDiv.hDiv.{0, 0, 0} K K K (instHDiv.{0} K (Field.toDiv.{0} K _inst_3)) (Algebra.cast.{0, 0} (Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_3))) _inst_4 r₂) (Algebra.cast.{0, 0} (Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_3))) _inst_4 g₂)))))))))
+<too large>
Case conversion may be inaccurate. Consider using '#align div_eq_quo_add_rem_div_add_rem_div div_eq_quo_add_rem_div_add_rem_divₓ'. -/
/-- Let R be an integral domain and f, g₁, g₂ ∈ R[X]. Let g₁ and g₂ be monic and coprime.
Then, ∃ q, r₁, r₂ ∈ R[X] such that f / g₁g₂ = q + r₁/g₁ + r₂/g₂ and deg(r₁) < deg(g₁) and
@@ -99,10 +96,7 @@ section NDenominators
open BigOperators Classical
/- warning: div_eq_quo_add_sum_rem_div -> div_eq_quo_add_sum_rem_div is a dubious translation:
-lean 3 declaration is
- forall (R : Type) [_inst_1 : CommRing.{0} R] [_inst_2 : IsDomain.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))] (K : Type) [_inst_3 : Field.{0} K] [_inst_4 : Algebra.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3)))] [_inst_5 : IsFractionRing.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) (Polynomial.commRing.{0} R _inst_1) K (Field.toCommRing.{0} K _inst_3) _inst_4] (f : Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) {ι : Type.{u1}} {g : ι -> (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)))} {s : Finset.{u1} ι}, (forall (i : ι), (Membership.Mem.{u1, u1} ι (Finset.{u1} ι) (Finset.hasMem.{u1} ι) i s) -> (Polynomial.Monic.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)) (g i))) -> (Set.Pairwise.{u1} ι ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (Finset.{u1} ι) (Set.{u1} ι) (HasLiftT.mk.{succ u1, succ u1} (Finset.{u1} ι) (Set.{u1} ι) (CoeTCₓ.coe.{succ u1, succ u1} (Finset.{u1} ι) (Set.{u1} ι) (Finset.Set.hasCoeT.{u1} ι))) s) (fun (i : ι) (j : ι) => IsCoprime.{0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (g i) (g j))) -> (Exists.{1} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) (fun (q : Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) => Exists.{succ u1} (ι -> (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)))) (fun (r : ι -> (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)))) => And (forall (i : ι), (Membership.Mem.{u1, u1} ι (Finset.{u1} ι) (Finset.hasMem.{u1} ι) i s) -> (LT.lt.{0} (WithBot.{0} Nat) (Preorder.toHasLt.{0} (WithBot.{0} Nat) (WithBot.preorder.{0} Nat (PartialOrder.toPreorder.{0} Nat (OrderedCancelAddCommMonoid.toPartialOrder.{0} Nat (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{0} Nat Nat.strictOrderedSemiring))))) (Polynomial.degree.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)) (r i)) (Polynomial.degree.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)) (g i)))) (Eq.{1} K (HDiv.hDiv.{0, 0, 0} K K K (instHDiv.{0} K (DivInvMonoid.toHasDiv.{0} K (DivisionRing.toDivInvMonoid.{0} K (Field.toDivisionRing.{0} K _inst_3)))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (algebraMap.coeHTCT.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))) _inst_4) f) (Finset.prod.{0, u1} K ι (CommRing.toCommMonoid.{0} K (Field.toCommRing.{0} K _inst_3)) s (fun (i : ι) => (fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (algebraMap.coeHTCT.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))) _inst_4) (g i)))) (HAdd.hAdd.{0, 0, 0} K K K (instHAdd.{0} K (Distrib.toHasAdd.{0} K (Ring.toDistrib.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (algebraMap.coeHTCT.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))) _inst_4) q) (Finset.sum.{0, u1} K ι (AddCommGroup.toAddCommMonoid.{0} K (NonUnitalNonAssocRing.toAddCommGroup.{0} K (NonAssocRing.toNonUnitalNonAssocRing.{0} K (Ring.toNonAssocRing.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3)))))) s (fun (i : ι) => HDiv.hDiv.{0, 0, 0} K K K (instHDiv.{0} K (DivInvMonoid.toHasDiv.{0} K (DivisionRing.toDivInvMonoid.{0} K (Field.toDivisionRing.{0} K _inst_3)))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (algebraMap.coeHTCT.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))) _inst_4) (r i)) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (algebraMap.coeHTCT.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))) _inst_4) (g i)))))))))
-but is expected to have type
- forall (R : Type) [_inst_1 : CommRing.{0} R] [_inst_2 : IsDomain.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))] (K : Type) [_inst_3 : Field.{0} K] [_inst_4 : Algebra.{0, 0} (Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_3)))] [_inst_5 : IsFractionRing.{0, 0} (Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) (Polynomial.commRing.{0} R _inst_1) K (Field.toCommRing.{0} K _inst_3) _inst_4] (f : Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) {ι : Type.{u1}} {g : ι -> (Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)))} {s : Finset.{u1} ι}, (forall (i : ι), (Membership.mem.{u1, u1} ι (Finset.{u1} ι) (Finset.instMembershipFinset.{u1} ι) i s) -> (Polynomial.Monic.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (g i))) -> (Set.Pairwise.{u1} ι (Finset.toSet.{u1} ι s) (fun (i : ι) (j : ι) => IsCoprime.{0} (Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (g i) (g j))) -> (Exists.{1} (Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) (fun (q : Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) => Exists.{succ u1} (ι -> (Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)))) (fun (r : ι -> (Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)))) => And (forall (i : ι), (Membership.mem.{u1, u1} ι (Finset.{u1} ι) (Finset.instMembershipFinset.{u1} ι) i s) -> (LT.lt.{0} (WithBot.{0} Nat) (Preorder.toLT.{0} (WithBot.{0} Nat) (WithBot.preorder.{0} Nat (PartialOrder.toPreorder.{0} Nat (StrictOrderedSemiring.toPartialOrder.{0} Nat Nat.strictOrderedSemiring)))) (Polynomial.degree.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (r i)) (Polynomial.degree.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (g i)))) (Eq.{1} K (HDiv.hDiv.{0, 0, 0} K K K (instHDiv.{0} K (Field.toDiv.{0} K _inst_3)) (Algebra.cast.{0, 0} (Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_3))) _inst_4 f) (Finset.prod.{0, u1} K ι (CommRing.toCommMonoid.{0} K (Field.toCommRing.{0} K _inst_3)) s (fun (i : ι) => Algebra.cast.{0, 0} (Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_3))) _inst_4 (g i)))) (HAdd.hAdd.{0, 0, 0} K K K (instHAdd.{0} K (Distrib.toAdd.{0} K (NonUnitalNonAssocSemiring.toDistrib.{0} K (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{0} K (NonAssocRing.toNonUnitalNonAssocRing.{0} K (Ring.toNonAssocRing.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3)))))))) (Algebra.cast.{0, 0} (Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_3))) _inst_4 q) (Finset.sum.{0, u1} K ι (NonUnitalNonAssocSemiring.toAddCommMonoid.{0} K (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{0} K (NonAssocRing.toNonUnitalNonAssocRing.{0} K (Ring.toNonAssocRing.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3)))))) s (fun (i : ι) => HDiv.hDiv.{0, 0, 0} K K K (instHDiv.{0} K (Field.toDiv.{0} K _inst_3)) (Algebra.cast.{0, 0} (Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_3))) _inst_4 (r i)) (Algebra.cast.{0, 0} (Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_3))) _inst_4 (g i)))))))))
+<too large>
Case conversion may be inaccurate. Consider using '#align div_eq_quo_add_sum_rem_div div_eq_quo_add_sum_rem_divₓ'. -/
/-- Let R be an integral domain and f ∈ R[X]. Let s be a finite index set.
Then, a fraction of the form f / ∏ (g i) can be rewritten as q + ∑ (r i) / (g i), where
mathlib commit https://github.com/leanprover-community/mathlib/commit/0b9eaaa7686280fad8cce467f5c3c57ee6ce77f8
@@ -61,7 +61,7 @@ section TwoDenominators
/- warning: div_eq_quo_add_rem_div_add_rem_div -> div_eq_quo_add_rem_div_add_rem_div is a dubious translation:
lean 3 declaration is
- forall (R : Type) [_inst_1 : CommRing.{0} R] [_inst_2 : IsDomain.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))] (K : Type) [_inst_3 : Field.{0} K] [_inst_4 : Algebra.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3)))] [_inst_5 : IsFractionRing.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) (Polynomial.commRing.{0} R _inst_1) K (Field.toCommRing.{0} K _inst_3) _inst_4] (f : Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) {g₁ : Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))} {g₂ : Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))}, (Polynomial.Monic.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)) g₁) -> (Polynomial.Monic.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)) g₂) -> (IsCoprime.{0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) g₁ g₂) -> (Exists.{1} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) (fun (q : Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) => Exists.{1} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) (fun (r₁ : Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) => Exists.{1} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) (fun (r₂ : Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) => And (LT.lt.{0} (WithBot.{0} Nat) (Preorder.toLT.{0} (WithBot.{0} Nat) (WithBot.preorder.{0} Nat (PartialOrder.toPreorder.{0} Nat (OrderedCancelAddCommMonoid.toPartialOrder.{0} Nat (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{0} Nat Nat.strictOrderedSemiring))))) (Polynomial.degree.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)) r₁) (Polynomial.degree.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)) g₁)) (And (LT.lt.{0} (WithBot.{0} Nat) (Preorder.toLT.{0} (WithBot.{0} Nat) (WithBot.preorder.{0} Nat (PartialOrder.toPreorder.{0} Nat (OrderedCancelAddCommMonoid.toPartialOrder.{0} Nat (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{0} Nat Nat.strictOrderedSemiring))))) (Polynomial.degree.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)) r₂) (Polynomial.degree.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)) g₂)) (Eq.{1} K (HDiv.hDiv.{0, 0, 0} K K K (instHDiv.{0} K (DivInvMonoid.toHasDiv.{0} K (DivisionRing.toDivInvMonoid.{0} K (Field.toDivisionRing.{0} K _inst_3)))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (algebraMap.coeHTCT.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))) _inst_4) f) (HMul.hMul.{0, 0, 0} K K K (instHMul.{0} K (Distrib.toHasMul.{0} K (Ring.toDistrib.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (algebraMap.coeHTCT.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))) _inst_4) g₁) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (algebraMap.coeHTCT.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))) _inst_4) g₂))) (HAdd.hAdd.{0, 0, 0} K K K (instHAdd.{0} K (Distrib.toHasAdd.{0} K (Ring.toDistrib.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))))) (HAdd.hAdd.{0, 0, 0} K K K (instHAdd.{0} K (Distrib.toHasAdd.{0} K (Ring.toDistrib.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (algebraMap.coeHTCT.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))) _inst_4) q) (HDiv.hDiv.{0, 0, 0} K K K (instHDiv.{0} K (DivInvMonoid.toHasDiv.{0} K (DivisionRing.toDivInvMonoid.{0} K (Field.toDivisionRing.{0} K _inst_3)))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (algebraMap.coeHTCT.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))) _inst_4) r₁) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (algebraMap.coeHTCT.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))) _inst_4) g₁))) (HDiv.hDiv.{0, 0, 0} K K K (instHDiv.{0} K (DivInvMonoid.toHasDiv.{0} K (DivisionRing.toDivInvMonoid.{0} K (Field.toDivisionRing.{0} K _inst_3)))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (algebraMap.coeHTCT.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))) _inst_4) r₂) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (algebraMap.coeHTCT.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))) _inst_4) g₂)))))))))
+ forall (R : Type) [_inst_1 : CommRing.{0} R] [_inst_2 : IsDomain.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))] (K : Type) [_inst_3 : Field.{0} K] [_inst_4 : Algebra.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3)))] [_inst_5 : IsFractionRing.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) (Polynomial.commRing.{0} R _inst_1) K (Field.toCommRing.{0} K _inst_3) _inst_4] (f : Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) {g₁ : Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))} {g₂ : Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))}, (Polynomial.Monic.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)) g₁) -> (Polynomial.Monic.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)) g₂) -> (IsCoprime.{0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) g₁ g₂) -> (Exists.{1} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) (fun (q : Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) => Exists.{1} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) (fun (r₁ : Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) => Exists.{1} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) (fun (r₂ : Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) => And (LT.lt.{0} (WithBot.{0} Nat) (Preorder.toHasLt.{0} (WithBot.{0} Nat) (WithBot.preorder.{0} Nat (PartialOrder.toPreorder.{0} Nat (OrderedCancelAddCommMonoid.toPartialOrder.{0} Nat (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{0} Nat Nat.strictOrderedSemiring))))) (Polynomial.degree.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)) r₁) (Polynomial.degree.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)) g₁)) (And (LT.lt.{0} (WithBot.{0} Nat) (Preorder.toHasLt.{0} (WithBot.{0} Nat) (WithBot.preorder.{0} Nat (PartialOrder.toPreorder.{0} Nat (OrderedCancelAddCommMonoid.toPartialOrder.{0} Nat (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{0} Nat Nat.strictOrderedSemiring))))) (Polynomial.degree.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)) r₂) (Polynomial.degree.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)) g₂)) (Eq.{1} K (HDiv.hDiv.{0, 0, 0} K K K (instHDiv.{0} K (DivInvMonoid.toHasDiv.{0} K (DivisionRing.toDivInvMonoid.{0} K (Field.toDivisionRing.{0} K _inst_3)))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (algebraMap.coeHTCT.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))) _inst_4) f) (HMul.hMul.{0, 0, 0} K K K (instHMul.{0} K (Distrib.toHasMul.{0} K (Ring.toDistrib.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (algebraMap.coeHTCT.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))) _inst_4) g₁) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (algebraMap.coeHTCT.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))) _inst_4) g₂))) (HAdd.hAdd.{0, 0, 0} K K K (instHAdd.{0} K (Distrib.toHasAdd.{0} K (Ring.toDistrib.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))))) (HAdd.hAdd.{0, 0, 0} K K K (instHAdd.{0} K (Distrib.toHasAdd.{0} K (Ring.toDistrib.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (algebraMap.coeHTCT.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))) _inst_4) q) (HDiv.hDiv.{0, 0, 0} K K K (instHDiv.{0} K (DivInvMonoid.toHasDiv.{0} K (DivisionRing.toDivInvMonoid.{0} K (Field.toDivisionRing.{0} K _inst_3)))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (algebraMap.coeHTCT.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))) _inst_4) r₁) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (algebraMap.coeHTCT.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))) _inst_4) g₁))) (HDiv.hDiv.{0, 0, 0} K K K (instHDiv.{0} K (DivInvMonoid.toHasDiv.{0} K (DivisionRing.toDivInvMonoid.{0} K (Field.toDivisionRing.{0} K _inst_3)))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (algebraMap.coeHTCT.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))) _inst_4) r₂) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (algebraMap.coeHTCT.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))) _inst_4) g₂)))))))))
but is expected to have type
forall (R : Type) [_inst_1 : CommRing.{0} R] [_inst_2 : IsDomain.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))] (K : Type) [_inst_3 : Field.{0} K] [_inst_4 : Algebra.{0, 0} (Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_3)))] [_inst_5 : IsFractionRing.{0, 0} (Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) (Polynomial.commRing.{0} R _inst_1) K (Field.toCommRing.{0} K _inst_3) _inst_4] (f : Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) {g₁ : Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))} {g₂ : Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))}, (Polynomial.Monic.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) g₁) -> (Polynomial.Monic.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) g₂) -> (IsCoprime.{0} (Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) g₁ g₂) -> (Exists.{1} (Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) (fun (q : Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) => Exists.{1} (Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) (fun (r₁ : Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) => Exists.{1} (Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) (fun (r₂ : Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) => And (LT.lt.{0} (WithBot.{0} Nat) (Preorder.toLT.{0} (WithBot.{0} Nat) (WithBot.preorder.{0} Nat (PartialOrder.toPreorder.{0} Nat (StrictOrderedSemiring.toPartialOrder.{0} Nat Nat.strictOrderedSemiring)))) (Polynomial.degree.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) r₁) (Polynomial.degree.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) g₁)) (And (LT.lt.{0} (WithBot.{0} Nat) (Preorder.toLT.{0} (WithBot.{0} Nat) (WithBot.preorder.{0} Nat (PartialOrder.toPreorder.{0} Nat (StrictOrderedSemiring.toPartialOrder.{0} Nat Nat.strictOrderedSemiring)))) (Polynomial.degree.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) r₂) (Polynomial.degree.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) g₂)) (Eq.{1} K (HDiv.hDiv.{0, 0, 0} K K K (instHDiv.{0} K (Field.toDiv.{0} K _inst_3)) (Algebra.cast.{0, 0} (Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_3))) _inst_4 f) (HMul.hMul.{0, 0, 0} K K K (instHMul.{0} K (NonUnitalNonAssocRing.toMul.{0} K (NonAssocRing.toNonUnitalNonAssocRing.{0} K (Ring.toNonAssocRing.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3)))))) (Algebra.cast.{0, 0} (Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_3))) _inst_4 g₁) (Algebra.cast.{0, 0} (Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_3))) _inst_4 g₂))) (HAdd.hAdd.{0, 0, 0} K K K (instHAdd.{0} K (Distrib.toAdd.{0} K (NonUnitalNonAssocSemiring.toDistrib.{0} K (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{0} K (NonAssocRing.toNonUnitalNonAssocRing.{0} K (Ring.toNonAssocRing.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3)))))))) (HAdd.hAdd.{0, 0, 0} K K K (instHAdd.{0} K (Distrib.toAdd.{0} K (NonUnitalNonAssocSemiring.toDistrib.{0} K (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{0} K (NonAssocRing.toNonUnitalNonAssocRing.{0} K (Ring.toNonAssocRing.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3)))))))) (Algebra.cast.{0, 0} (Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_3))) _inst_4 q) (HDiv.hDiv.{0, 0, 0} K K K (instHDiv.{0} K (Field.toDiv.{0} K _inst_3)) (Algebra.cast.{0, 0} (Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_3))) _inst_4 r₁) (Algebra.cast.{0, 0} (Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_3))) _inst_4 g₁))) (HDiv.hDiv.{0, 0, 0} K K K (instHDiv.{0} K (Field.toDiv.{0} K _inst_3)) (Algebra.cast.{0, 0} (Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_3))) _inst_4 r₂) (Algebra.cast.{0, 0} (Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_3))) _inst_4 g₂)))))))))
Case conversion may be inaccurate. Consider using '#align div_eq_quo_add_rem_div_add_rem_div div_eq_quo_add_rem_div_add_rem_divₓ'. -/
@@ -100,7 +100,7 @@ open BigOperators Classical
/- warning: div_eq_quo_add_sum_rem_div -> div_eq_quo_add_sum_rem_div is a dubious translation:
lean 3 declaration is
- forall (R : Type) [_inst_1 : CommRing.{0} R] [_inst_2 : IsDomain.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))] (K : Type) [_inst_3 : Field.{0} K] [_inst_4 : Algebra.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3)))] [_inst_5 : IsFractionRing.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) (Polynomial.commRing.{0} R _inst_1) K (Field.toCommRing.{0} K _inst_3) _inst_4] (f : Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) {ι : Type.{u1}} {g : ι -> (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)))} {s : Finset.{u1} ι}, (forall (i : ι), (Membership.Mem.{u1, u1} ι (Finset.{u1} ι) (Finset.hasMem.{u1} ι) i s) -> (Polynomial.Monic.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)) (g i))) -> (Set.Pairwise.{u1} ι ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (Finset.{u1} ι) (Set.{u1} ι) (HasLiftT.mk.{succ u1, succ u1} (Finset.{u1} ι) (Set.{u1} ι) (CoeTCₓ.coe.{succ u1, succ u1} (Finset.{u1} ι) (Set.{u1} ι) (Finset.Set.hasCoeT.{u1} ι))) s) (fun (i : ι) (j : ι) => IsCoprime.{0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (g i) (g j))) -> (Exists.{1} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) (fun (q : Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) => Exists.{succ u1} (ι -> (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)))) (fun (r : ι -> (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)))) => And (forall (i : ι), (Membership.Mem.{u1, u1} ι (Finset.{u1} ι) (Finset.hasMem.{u1} ι) i s) -> (LT.lt.{0} (WithBot.{0} Nat) (Preorder.toLT.{0} (WithBot.{0} Nat) (WithBot.preorder.{0} Nat (PartialOrder.toPreorder.{0} Nat (OrderedCancelAddCommMonoid.toPartialOrder.{0} Nat (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{0} Nat Nat.strictOrderedSemiring))))) (Polynomial.degree.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)) (r i)) (Polynomial.degree.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)) (g i)))) (Eq.{1} K (HDiv.hDiv.{0, 0, 0} K K K (instHDiv.{0} K (DivInvMonoid.toHasDiv.{0} K (DivisionRing.toDivInvMonoid.{0} K (Field.toDivisionRing.{0} K _inst_3)))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (algebraMap.coeHTCT.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))) _inst_4) f) (Finset.prod.{0, u1} K ι (CommRing.toCommMonoid.{0} K (Field.toCommRing.{0} K _inst_3)) s (fun (i : ι) => (fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (algebraMap.coeHTCT.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))) _inst_4) (g i)))) (HAdd.hAdd.{0, 0, 0} K K K (instHAdd.{0} K (Distrib.toHasAdd.{0} K (Ring.toDistrib.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (algebraMap.coeHTCT.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))) _inst_4) q) (Finset.sum.{0, u1} K ι (AddCommGroup.toAddCommMonoid.{0} K (NonUnitalNonAssocRing.toAddCommGroup.{0} K (NonAssocRing.toNonUnitalNonAssocRing.{0} K (Ring.toNonAssocRing.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3)))))) s (fun (i : ι) => HDiv.hDiv.{0, 0, 0} K K K (instHDiv.{0} K (DivInvMonoid.toHasDiv.{0} K (DivisionRing.toDivInvMonoid.{0} K (Field.toDivisionRing.{0} K _inst_3)))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (algebraMap.coeHTCT.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))) _inst_4) (r i)) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (algebraMap.coeHTCT.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))) _inst_4) (g i)))))))))
+ forall (R : Type) [_inst_1 : CommRing.{0} R] [_inst_2 : IsDomain.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))] (K : Type) [_inst_3 : Field.{0} K] [_inst_4 : Algebra.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3)))] [_inst_5 : IsFractionRing.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) (Polynomial.commRing.{0} R _inst_1) K (Field.toCommRing.{0} K _inst_3) _inst_4] (f : Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) {ι : Type.{u1}} {g : ι -> (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)))} {s : Finset.{u1} ι}, (forall (i : ι), (Membership.Mem.{u1, u1} ι (Finset.{u1} ι) (Finset.hasMem.{u1} ι) i s) -> (Polynomial.Monic.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)) (g i))) -> (Set.Pairwise.{u1} ι ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (Finset.{u1} ι) (Set.{u1} ι) (HasLiftT.mk.{succ u1, succ u1} (Finset.{u1} ι) (Set.{u1} ι) (CoeTCₓ.coe.{succ u1, succ u1} (Finset.{u1} ι) (Set.{u1} ι) (Finset.Set.hasCoeT.{u1} ι))) s) (fun (i : ι) (j : ι) => IsCoprime.{0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (g i) (g j))) -> (Exists.{1} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) (fun (q : Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) => Exists.{succ u1} (ι -> (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)))) (fun (r : ι -> (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)))) => And (forall (i : ι), (Membership.Mem.{u1, u1} ι (Finset.{u1} ι) (Finset.hasMem.{u1} ι) i s) -> (LT.lt.{0} (WithBot.{0} Nat) (Preorder.toHasLt.{0} (WithBot.{0} Nat) (WithBot.preorder.{0} Nat (PartialOrder.toPreorder.{0} Nat (OrderedCancelAddCommMonoid.toPartialOrder.{0} Nat (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{0} Nat Nat.strictOrderedSemiring))))) (Polynomial.degree.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)) (r i)) (Polynomial.degree.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)) (g i)))) (Eq.{1} K (HDiv.hDiv.{0, 0, 0} K K K (instHDiv.{0} K (DivInvMonoid.toHasDiv.{0} K (DivisionRing.toDivInvMonoid.{0} K (Field.toDivisionRing.{0} K _inst_3)))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (algebraMap.coeHTCT.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))) _inst_4) f) (Finset.prod.{0, u1} K ι (CommRing.toCommMonoid.{0} K (Field.toCommRing.{0} K _inst_3)) s (fun (i : ι) => (fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (algebraMap.coeHTCT.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))) _inst_4) (g i)))) (HAdd.hAdd.{0, 0, 0} K K K (instHAdd.{0} K (Distrib.toHasAdd.{0} K (Ring.toDistrib.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (algebraMap.coeHTCT.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))) _inst_4) q) (Finset.sum.{0, u1} K ι (AddCommGroup.toAddCommMonoid.{0} K (NonUnitalNonAssocRing.toAddCommGroup.{0} K (NonAssocRing.toNonUnitalNonAssocRing.{0} K (Ring.toNonAssocRing.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3)))))) s (fun (i : ι) => HDiv.hDiv.{0, 0, 0} K K K (instHDiv.{0} K (DivInvMonoid.toHasDiv.{0} K (DivisionRing.toDivInvMonoid.{0} K (Field.toDivisionRing.{0} K _inst_3)))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (algebraMap.coeHTCT.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))) _inst_4) (r i)) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (algebraMap.coeHTCT.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))) _inst_4) (g i)))))))))
but is expected to have type
forall (R : Type) [_inst_1 : CommRing.{0} R] [_inst_2 : IsDomain.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))] (K : Type) [_inst_3 : Field.{0} K] [_inst_4 : Algebra.{0, 0} (Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_3)))] [_inst_5 : IsFractionRing.{0, 0} (Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) (Polynomial.commRing.{0} R _inst_1) K (Field.toCommRing.{0} K _inst_3) _inst_4] (f : Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) {ι : Type.{u1}} {g : ι -> (Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)))} {s : Finset.{u1} ι}, (forall (i : ι), (Membership.mem.{u1, u1} ι (Finset.{u1} ι) (Finset.instMembershipFinset.{u1} ι) i s) -> (Polynomial.Monic.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (g i))) -> (Set.Pairwise.{u1} ι (Finset.toSet.{u1} ι s) (fun (i : ι) (j : ι) => IsCoprime.{0} (Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (g i) (g j))) -> (Exists.{1} (Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) (fun (q : Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) => Exists.{succ u1} (ι -> (Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)))) (fun (r : ι -> (Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)))) => And (forall (i : ι), (Membership.mem.{u1, u1} ι (Finset.{u1} ι) (Finset.instMembershipFinset.{u1} ι) i s) -> (LT.lt.{0} (WithBot.{0} Nat) (Preorder.toLT.{0} (WithBot.{0} Nat) (WithBot.preorder.{0} Nat (PartialOrder.toPreorder.{0} Nat (StrictOrderedSemiring.toPartialOrder.{0} Nat Nat.strictOrderedSemiring)))) (Polynomial.degree.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (r i)) (Polynomial.degree.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (g i)))) (Eq.{1} K (HDiv.hDiv.{0, 0, 0} K K K (instHDiv.{0} K (Field.toDiv.{0} K _inst_3)) (Algebra.cast.{0, 0} (Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_3))) _inst_4 f) (Finset.prod.{0, u1} K ι (CommRing.toCommMonoid.{0} K (Field.toCommRing.{0} K _inst_3)) s (fun (i : ι) => Algebra.cast.{0, 0} (Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_3))) _inst_4 (g i)))) (HAdd.hAdd.{0, 0, 0} K K K (instHAdd.{0} K (Distrib.toAdd.{0} K (NonUnitalNonAssocSemiring.toDistrib.{0} K (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{0} K (NonAssocRing.toNonUnitalNonAssocRing.{0} K (Ring.toNonAssocRing.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3)))))))) (Algebra.cast.{0, 0} (Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_3))) _inst_4 q) (Finset.sum.{0, u1} K ι (NonUnitalNonAssocSemiring.toAddCommMonoid.{0} K (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{0} K (NonAssocRing.toNonUnitalNonAssocRing.{0} K (Ring.toNonAssocRing.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3)))))) s (fun (i : ι) => HDiv.hDiv.{0, 0, 0} K K K (instHDiv.{0} K (Field.toDiv.{0} K _inst_3)) (Algebra.cast.{0, 0} (Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_3))) _inst_4 (r i)) (Algebra.cast.{0, 0} (Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_3))) _inst_4 (g i)))))))))
Case conversion may be inaccurate. Consider using '#align div_eq_quo_add_sum_rem_div div_eq_quo_add_sum_rem_divₓ'. -/
mathlib commit https://github.com/leanprover-community/mathlib/commit/08e1d8d4d989df3a6df86f385e9053ec8a372cc1
@@ -63,7 +63,7 @@ section TwoDenominators
lean 3 declaration is
forall (R : Type) [_inst_1 : CommRing.{0} R] [_inst_2 : IsDomain.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))] (K : Type) [_inst_3 : Field.{0} K] [_inst_4 : Algebra.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3)))] [_inst_5 : IsFractionRing.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) (Polynomial.commRing.{0} R _inst_1) K (Field.toCommRing.{0} K _inst_3) _inst_4] (f : Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) {g₁ : Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))} {g₂ : Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))}, (Polynomial.Monic.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)) g₁) -> (Polynomial.Monic.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)) g₂) -> (IsCoprime.{0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) g₁ g₂) -> (Exists.{1} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) (fun (q : Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) => Exists.{1} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) (fun (r₁ : Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) => Exists.{1} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) (fun (r₂ : Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) => And (LT.lt.{0} (WithBot.{0} Nat) (Preorder.toLT.{0} (WithBot.{0} Nat) (WithBot.preorder.{0} Nat (PartialOrder.toPreorder.{0} Nat (OrderedCancelAddCommMonoid.toPartialOrder.{0} Nat (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{0} Nat Nat.strictOrderedSemiring))))) (Polynomial.degree.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)) r₁) (Polynomial.degree.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)) g₁)) (And (LT.lt.{0} (WithBot.{0} Nat) (Preorder.toLT.{0} (WithBot.{0} Nat) (WithBot.preorder.{0} Nat (PartialOrder.toPreorder.{0} Nat (OrderedCancelAddCommMonoid.toPartialOrder.{0} Nat (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{0} Nat Nat.strictOrderedSemiring))))) (Polynomial.degree.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)) r₂) (Polynomial.degree.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)) g₂)) (Eq.{1} K (HDiv.hDiv.{0, 0, 0} K K K (instHDiv.{0} K (DivInvMonoid.toHasDiv.{0} K (DivisionRing.toDivInvMonoid.{0} K (Field.toDivisionRing.{0} K _inst_3)))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (algebraMap.coeHTCT.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))) _inst_4) f) (HMul.hMul.{0, 0, 0} K K K (instHMul.{0} K (Distrib.toHasMul.{0} K (Ring.toDistrib.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (algebraMap.coeHTCT.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))) _inst_4) g₁) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (algebraMap.coeHTCT.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))) _inst_4) g₂))) (HAdd.hAdd.{0, 0, 0} K K K (instHAdd.{0} K (Distrib.toHasAdd.{0} K (Ring.toDistrib.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))))) (HAdd.hAdd.{0, 0, 0} K K K (instHAdd.{0} K (Distrib.toHasAdd.{0} K (Ring.toDistrib.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (algebraMap.coeHTCT.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))) _inst_4) q) (HDiv.hDiv.{0, 0, 0} K K K (instHDiv.{0} K (DivInvMonoid.toHasDiv.{0} K (DivisionRing.toDivInvMonoid.{0} K (Field.toDivisionRing.{0} K _inst_3)))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (algebraMap.coeHTCT.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))) _inst_4) r₁) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (algebraMap.coeHTCT.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))) _inst_4) g₁))) (HDiv.hDiv.{0, 0, 0} K K K (instHDiv.{0} K (DivInvMonoid.toHasDiv.{0} K (DivisionRing.toDivInvMonoid.{0} K (Field.toDivisionRing.{0} K _inst_3)))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (algebraMap.coeHTCT.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))) _inst_4) r₂) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (algebraMap.coeHTCT.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))) _inst_4) g₂)))))))))
but is expected to have type
- forall (R : Type) [_inst_1 : CommRing.{0} R] [_inst_2 : IsDomain.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))] (K : Type) [_inst_3 : Field.{0} K] [_inst_4 : Algebra.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_3)))] [_inst_5 : IsFractionRing.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) (Polynomial.commRing.{0} R _inst_1) K (Field.toCommRing.{0} K _inst_3) _inst_4] (f : Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) {g₁ : Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))} {g₂ : Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))}, (Polynomial.Monic.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)) g₁) -> (Polynomial.Monic.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)) g₂) -> (IsCoprime.{0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) g₁ g₂) -> (Exists.{1} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) (fun (q : Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) => Exists.{1} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) (fun (r₁ : Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) => Exists.{1} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) (fun (r₂ : Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) => And (LT.lt.{0} (WithBot.{0} Nat) (Preorder.toLT.{0} (WithBot.{0} Nat) (WithBot.preorder.{0} Nat (PartialOrder.toPreorder.{0} Nat (StrictOrderedSemiring.toPartialOrder.{0} Nat Nat.strictOrderedSemiring)))) (Polynomial.degree.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)) r₁) (Polynomial.degree.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)) g₁)) (And (LT.lt.{0} (WithBot.{0} Nat) (Preorder.toLT.{0} (WithBot.{0} Nat) (WithBot.preorder.{0} Nat (PartialOrder.toPreorder.{0} Nat (StrictOrderedSemiring.toPartialOrder.{0} Nat Nat.strictOrderedSemiring)))) (Polynomial.degree.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)) r₂) (Polynomial.degree.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)) g₂)) (Eq.{1} K (HDiv.hDiv.{0, 0, 0} K K K (instHDiv.{0} K (Field.toDiv.{0} K _inst_3)) (Algebra.cast.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_3))) _inst_4 f) (HMul.hMul.{0, 0, 0} K K K (instHMul.{0} K (NonUnitalNonAssocRing.toMul.{0} K (NonAssocRing.toNonUnitalNonAssocRing.{0} K (Ring.toNonAssocRing.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3)))))) (Algebra.cast.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_3))) _inst_4 g₁) (Algebra.cast.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_3))) _inst_4 g₂))) (HAdd.hAdd.{0, 0, 0} K K K (instHAdd.{0} K (Distrib.toAdd.{0} K (NonUnitalNonAssocSemiring.toDistrib.{0} K (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{0} K (NonAssocRing.toNonUnitalNonAssocRing.{0} K (Ring.toNonAssocRing.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3)))))))) (HAdd.hAdd.{0, 0, 0} K K K (instHAdd.{0} K (Distrib.toAdd.{0} K (NonUnitalNonAssocSemiring.toDistrib.{0} K (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{0} K (NonAssocRing.toNonUnitalNonAssocRing.{0} K (Ring.toNonAssocRing.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3)))))))) (Algebra.cast.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_3))) _inst_4 q) (HDiv.hDiv.{0, 0, 0} K K K (instHDiv.{0} K (Field.toDiv.{0} K _inst_3)) (Algebra.cast.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_3))) _inst_4 r₁) (Algebra.cast.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_3))) _inst_4 g₁))) (HDiv.hDiv.{0, 0, 0} K K K (instHDiv.{0} K (Field.toDiv.{0} K _inst_3)) (Algebra.cast.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_3))) _inst_4 r₂) (Algebra.cast.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_3))) _inst_4 g₂)))))))))
+ forall (R : Type) [_inst_1 : CommRing.{0} R] [_inst_2 : IsDomain.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))] (K : Type) [_inst_3 : Field.{0} K] [_inst_4 : Algebra.{0, 0} (Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_3)))] [_inst_5 : IsFractionRing.{0, 0} (Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) (Polynomial.commRing.{0} R _inst_1) K (Field.toCommRing.{0} K _inst_3) _inst_4] (f : Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) {g₁ : Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))} {g₂ : Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))}, (Polynomial.Monic.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) g₁) -> (Polynomial.Monic.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) g₂) -> (IsCoprime.{0} (Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) g₁ g₂) -> (Exists.{1} (Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) (fun (q : Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) => Exists.{1} (Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) (fun (r₁ : Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) => Exists.{1} (Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) (fun (r₂ : Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) => And (LT.lt.{0} (WithBot.{0} Nat) (Preorder.toLT.{0} (WithBot.{0} Nat) (WithBot.preorder.{0} Nat (PartialOrder.toPreorder.{0} Nat (StrictOrderedSemiring.toPartialOrder.{0} Nat Nat.strictOrderedSemiring)))) (Polynomial.degree.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) r₁) (Polynomial.degree.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) g₁)) (And (LT.lt.{0} (WithBot.{0} Nat) (Preorder.toLT.{0} (WithBot.{0} Nat) (WithBot.preorder.{0} Nat (PartialOrder.toPreorder.{0} Nat (StrictOrderedSemiring.toPartialOrder.{0} Nat Nat.strictOrderedSemiring)))) (Polynomial.degree.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) r₂) (Polynomial.degree.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) g₂)) (Eq.{1} K (HDiv.hDiv.{0, 0, 0} K K K (instHDiv.{0} K (Field.toDiv.{0} K _inst_3)) (Algebra.cast.{0, 0} (Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_3))) _inst_4 f) (HMul.hMul.{0, 0, 0} K K K (instHMul.{0} K (NonUnitalNonAssocRing.toMul.{0} K (NonAssocRing.toNonUnitalNonAssocRing.{0} K (Ring.toNonAssocRing.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3)))))) (Algebra.cast.{0, 0} (Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_3))) _inst_4 g₁) (Algebra.cast.{0, 0} (Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_3))) _inst_4 g₂))) (HAdd.hAdd.{0, 0, 0} K K K (instHAdd.{0} K (Distrib.toAdd.{0} K (NonUnitalNonAssocSemiring.toDistrib.{0} K (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{0} K (NonAssocRing.toNonUnitalNonAssocRing.{0} K (Ring.toNonAssocRing.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3)))))))) (HAdd.hAdd.{0, 0, 0} K K K (instHAdd.{0} K (Distrib.toAdd.{0} K (NonUnitalNonAssocSemiring.toDistrib.{0} K (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{0} K (NonAssocRing.toNonUnitalNonAssocRing.{0} K (Ring.toNonAssocRing.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3)))))))) (Algebra.cast.{0, 0} (Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_3))) _inst_4 q) (HDiv.hDiv.{0, 0, 0} K K K (instHDiv.{0} K (Field.toDiv.{0} K _inst_3)) (Algebra.cast.{0, 0} (Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_3))) _inst_4 r₁) (Algebra.cast.{0, 0} (Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_3))) _inst_4 g₁))) (HDiv.hDiv.{0, 0, 0} K K K (instHDiv.{0} K (Field.toDiv.{0} K _inst_3)) (Algebra.cast.{0, 0} (Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_3))) _inst_4 r₂) (Algebra.cast.{0, 0} (Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_3))) _inst_4 g₂)))))))))
Case conversion may be inaccurate. Consider using '#align div_eq_quo_add_rem_div_add_rem_div div_eq_quo_add_rem_div_add_rem_divₓ'. -/
/-- Let R be an integral domain and f, g₁, g₂ ∈ R[X]. Let g₁ and g₂ be monic and coprime.
Then, ∃ q, r₁, r₂ ∈ R[X] such that f / g₁g₂ = q + r₁/g₁ + r₂/g₂ and deg(r₁) < deg(g₁) and
@@ -102,7 +102,7 @@ open BigOperators Classical
lean 3 declaration is
forall (R : Type) [_inst_1 : CommRing.{0} R] [_inst_2 : IsDomain.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))] (K : Type) [_inst_3 : Field.{0} K] [_inst_4 : Algebra.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3)))] [_inst_5 : IsFractionRing.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) (Polynomial.commRing.{0} R _inst_1) K (Field.toCommRing.{0} K _inst_3) _inst_4] (f : Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) {ι : Type.{u1}} {g : ι -> (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)))} {s : Finset.{u1} ι}, (forall (i : ι), (Membership.Mem.{u1, u1} ι (Finset.{u1} ι) (Finset.hasMem.{u1} ι) i s) -> (Polynomial.Monic.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)) (g i))) -> (Set.Pairwise.{u1} ι ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (Finset.{u1} ι) (Set.{u1} ι) (HasLiftT.mk.{succ u1, succ u1} (Finset.{u1} ι) (Set.{u1} ι) (CoeTCₓ.coe.{succ u1, succ u1} (Finset.{u1} ι) (Set.{u1} ι) (Finset.Set.hasCoeT.{u1} ι))) s) (fun (i : ι) (j : ι) => IsCoprime.{0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (g i) (g j))) -> (Exists.{1} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) (fun (q : Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) => Exists.{succ u1} (ι -> (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)))) (fun (r : ι -> (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)))) => And (forall (i : ι), (Membership.Mem.{u1, u1} ι (Finset.{u1} ι) (Finset.hasMem.{u1} ι) i s) -> (LT.lt.{0} (WithBot.{0} Nat) (Preorder.toLT.{0} (WithBot.{0} Nat) (WithBot.preorder.{0} Nat (PartialOrder.toPreorder.{0} Nat (OrderedCancelAddCommMonoid.toPartialOrder.{0} Nat (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{0} Nat Nat.strictOrderedSemiring))))) (Polynomial.degree.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)) (r i)) (Polynomial.degree.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)) (g i)))) (Eq.{1} K (HDiv.hDiv.{0, 0, 0} K K K (instHDiv.{0} K (DivInvMonoid.toHasDiv.{0} K (DivisionRing.toDivInvMonoid.{0} K (Field.toDivisionRing.{0} K _inst_3)))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (algebraMap.coeHTCT.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))) _inst_4) f) (Finset.prod.{0, u1} K ι (CommRing.toCommMonoid.{0} K (Field.toCommRing.{0} K _inst_3)) s (fun (i : ι) => (fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (algebraMap.coeHTCT.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))) _inst_4) (g i)))) (HAdd.hAdd.{0, 0, 0} K K K (instHAdd.{0} K (Distrib.toHasAdd.{0} K (Ring.toDistrib.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (algebraMap.coeHTCT.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))) _inst_4) q) (Finset.sum.{0, u1} K ι (AddCommGroup.toAddCommMonoid.{0} K (NonUnitalNonAssocRing.toAddCommGroup.{0} K (NonAssocRing.toNonUnitalNonAssocRing.{0} K (Ring.toNonAssocRing.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3)))))) s (fun (i : ι) => HDiv.hDiv.{0, 0, 0} K K K (instHDiv.{0} K (DivInvMonoid.toHasDiv.{0} K (DivisionRing.toDivInvMonoid.{0} K (Field.toDivisionRing.{0} K _inst_3)))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (algebraMap.coeHTCT.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))) _inst_4) (r i)) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (algebraMap.coeHTCT.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))) _inst_4) (g i)))))))))
but is expected to have type
- forall (R : Type) [_inst_1 : CommRing.{0} R] [_inst_2 : IsDomain.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))] (K : Type) [_inst_3 : Field.{0} K] [_inst_4 : Algebra.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_3)))] [_inst_5 : IsFractionRing.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) (Polynomial.commRing.{0} R _inst_1) K (Field.toCommRing.{0} K _inst_3) _inst_4] (f : Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) {ι : Type.{u1}} {g : ι -> (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)))} {s : Finset.{u1} ι}, (forall (i : ι), (Membership.mem.{u1, u1} ι (Finset.{u1} ι) (Finset.instMembershipFinset.{u1} ι) i s) -> (Polynomial.Monic.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)) (g i))) -> (Set.Pairwise.{u1} ι (Finset.toSet.{u1} ι s) (fun (i : ι) (j : ι) => IsCoprime.{0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (g i) (g j))) -> (Exists.{1} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) (fun (q : Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) => Exists.{succ u1} (ι -> (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)))) (fun (r : ι -> (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)))) => And (forall (i : ι), (Membership.mem.{u1, u1} ι (Finset.{u1} ι) (Finset.instMembershipFinset.{u1} ι) i s) -> (LT.lt.{0} (WithBot.{0} Nat) (Preorder.toLT.{0} (WithBot.{0} Nat) (WithBot.preorder.{0} Nat (PartialOrder.toPreorder.{0} Nat (StrictOrderedSemiring.toPartialOrder.{0} Nat Nat.strictOrderedSemiring)))) (Polynomial.degree.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)) (r i)) (Polynomial.degree.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)) (g i)))) (Eq.{1} K (HDiv.hDiv.{0, 0, 0} K K K (instHDiv.{0} K (Field.toDiv.{0} K _inst_3)) (Algebra.cast.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_3))) _inst_4 f) (Finset.prod.{0, u1} K ι (CommRing.toCommMonoid.{0} K (Field.toCommRing.{0} K _inst_3)) s (fun (i : ι) => Algebra.cast.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_3))) _inst_4 (g i)))) (HAdd.hAdd.{0, 0, 0} K K K (instHAdd.{0} K (Distrib.toAdd.{0} K (NonUnitalNonAssocSemiring.toDistrib.{0} K (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{0} K (NonAssocRing.toNonUnitalNonAssocRing.{0} K (Ring.toNonAssocRing.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3)))))))) (Algebra.cast.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_3))) _inst_4 q) (Finset.sum.{0, u1} K ι (NonUnitalNonAssocSemiring.toAddCommMonoid.{0} K (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{0} K (NonAssocRing.toNonUnitalNonAssocRing.{0} K (Ring.toNonAssocRing.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3)))))) s (fun (i : ι) => HDiv.hDiv.{0, 0, 0} K K K (instHDiv.{0} K (Field.toDiv.{0} K _inst_3)) (Algebra.cast.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_3))) _inst_4 (r i)) (Algebra.cast.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_3))) _inst_4 (g i)))))))))
+ forall (R : Type) [_inst_1 : CommRing.{0} R] [_inst_2 : IsDomain.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))] (K : Type) [_inst_3 : Field.{0} K] [_inst_4 : Algebra.{0, 0} (Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_3)))] [_inst_5 : IsFractionRing.{0, 0} (Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) (Polynomial.commRing.{0} R _inst_1) K (Field.toCommRing.{0} K _inst_3) _inst_4] (f : Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) {ι : Type.{u1}} {g : ι -> (Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)))} {s : Finset.{u1} ι}, (forall (i : ι), (Membership.mem.{u1, u1} ι (Finset.{u1} ι) (Finset.instMembershipFinset.{u1} ι) i s) -> (Polynomial.Monic.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (g i))) -> (Set.Pairwise.{u1} ι (Finset.toSet.{u1} ι s) (fun (i : ι) (j : ι) => IsCoprime.{0} (Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (g i) (g j))) -> (Exists.{1} (Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) (fun (q : Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) => Exists.{succ u1} (ι -> (Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)))) (fun (r : ι -> (Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)))) => And (forall (i : ι), (Membership.mem.{u1, u1} ι (Finset.{u1} ι) (Finset.instMembershipFinset.{u1} ι) i s) -> (LT.lt.{0} (WithBot.{0} Nat) (Preorder.toLT.{0} (WithBot.{0} Nat) (WithBot.preorder.{0} Nat (PartialOrder.toPreorder.{0} Nat (StrictOrderedSemiring.toPartialOrder.{0} Nat Nat.strictOrderedSemiring)))) (Polynomial.degree.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (r i)) (Polynomial.degree.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (g i)))) (Eq.{1} K (HDiv.hDiv.{0, 0, 0} K K K (instHDiv.{0} K (Field.toDiv.{0} K _inst_3)) (Algebra.cast.{0, 0} (Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_3))) _inst_4 f) (Finset.prod.{0, u1} K ι (CommRing.toCommMonoid.{0} K (Field.toCommRing.{0} K _inst_3)) s (fun (i : ι) => Algebra.cast.{0, 0} (Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_3))) _inst_4 (g i)))) (HAdd.hAdd.{0, 0, 0} K K K (instHAdd.{0} K (Distrib.toAdd.{0} K (NonUnitalNonAssocSemiring.toDistrib.{0} K (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{0} K (NonAssocRing.toNonUnitalNonAssocRing.{0} K (Ring.toNonAssocRing.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3)))))))) (Algebra.cast.{0, 0} (Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_3))) _inst_4 q) (Finset.sum.{0, u1} K ι (NonUnitalNonAssocSemiring.toAddCommMonoid.{0} K (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{0} K (NonAssocRing.toNonUnitalNonAssocRing.{0} K (Ring.toNonAssocRing.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3)))))) s (fun (i : ι) => HDiv.hDiv.{0, 0, 0} K K K (instHDiv.{0} K (Field.toDiv.{0} K _inst_3)) (Algebra.cast.{0, 0} (Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_3))) _inst_4 (r i)) (Algebra.cast.{0, 0} (Polynomial.{0} R (CommSemiring.toSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_3))) _inst_4 (g i)))))))))
Case conversion may be inaccurate. Consider using '#align div_eq_quo_add_sum_rem_div div_eq_quo_add_sum_rem_divₓ'. -/
/-- Let R be an integral domain and f ∈ R[X]. Let s be a finite index set.
Then, a fraction of the form f / ∏ (g i) can be rewritten as q + ∑ (r i) / (g i), where
mathlib commit https://github.com/leanprover-community/mathlib/commit/3cacc945118c8c637d89950af01da78307f59325
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kevin Buzzard, Sidharth Hariharan
! This file was ported from Lean 3 source module data.polynomial.partial_fractions
-! leanprover-community/mathlib commit 6e70e0d419bf686784937d64ed4bfde866ff229e
+! leanprover-community/mathlib commit 31ca6f9cf5f90a6206092cd7f84b359dcb6d52e0
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -19,6 +19,9 @@ import Mathbin.Tactic.LinearCombination
# Partial fractions
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
These results were formalised by the Xena Project, at the suggestion
of Patrick Massot.
mathlib commit https://github.com/leanprover-community/mathlib/commit/0148d455199ed64bf8eb2f493a1e7eb9211ce170
@@ -56,6 +56,12 @@ variable (K : Type) [Field K] [Algebra R[X] K] [IsFractionRing R[X] K]
section TwoDenominators
+/- warning: div_eq_quo_add_rem_div_add_rem_div -> div_eq_quo_add_rem_div_add_rem_div is a dubious translation:
+lean 3 declaration is
+ forall (R : Type) [_inst_1 : CommRing.{0} R] [_inst_2 : IsDomain.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))] (K : Type) [_inst_3 : Field.{0} K] [_inst_4 : Algebra.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3)))] [_inst_5 : IsFractionRing.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) (Polynomial.commRing.{0} R _inst_1) K (Field.toCommRing.{0} K _inst_3) _inst_4] (f : Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) {g₁ : Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))} {g₂ : Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))}, (Polynomial.Monic.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)) g₁) -> (Polynomial.Monic.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)) g₂) -> (IsCoprime.{0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) g₁ g₂) -> (Exists.{1} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) (fun (q : Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) => Exists.{1} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) (fun (r₁ : Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) => Exists.{1} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) (fun (r₂ : Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) => And (LT.lt.{0} (WithBot.{0} Nat) (Preorder.toLT.{0} (WithBot.{0} Nat) (WithBot.preorder.{0} Nat (PartialOrder.toPreorder.{0} Nat (OrderedCancelAddCommMonoid.toPartialOrder.{0} Nat (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{0} Nat Nat.strictOrderedSemiring))))) (Polynomial.degree.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)) r₁) (Polynomial.degree.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)) g₁)) (And (LT.lt.{0} (WithBot.{0} Nat) (Preorder.toLT.{0} (WithBot.{0} Nat) (WithBot.preorder.{0} Nat (PartialOrder.toPreorder.{0} Nat (OrderedCancelAddCommMonoid.toPartialOrder.{0} Nat (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{0} Nat Nat.strictOrderedSemiring))))) (Polynomial.degree.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)) r₂) (Polynomial.degree.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)) g₂)) (Eq.{1} K (HDiv.hDiv.{0, 0, 0} K K K (instHDiv.{0} K (DivInvMonoid.toHasDiv.{0} K (DivisionRing.toDivInvMonoid.{0} K (Field.toDivisionRing.{0} K _inst_3)))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (algebraMap.coeHTCT.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))) _inst_4) f) (HMul.hMul.{0, 0, 0} K K K (instHMul.{0} K (Distrib.toHasMul.{0} K (Ring.toDistrib.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (algebraMap.coeHTCT.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))) _inst_4) g₁) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (algebraMap.coeHTCT.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))) _inst_4) g₂))) (HAdd.hAdd.{0, 0, 0} K K K (instHAdd.{0} K (Distrib.toHasAdd.{0} K (Ring.toDistrib.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))))) (HAdd.hAdd.{0, 0, 0} K K K (instHAdd.{0} K (Distrib.toHasAdd.{0} K (Ring.toDistrib.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (algebraMap.coeHTCT.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))) _inst_4) q) (HDiv.hDiv.{0, 0, 0} K K K (instHDiv.{0} K (DivInvMonoid.toHasDiv.{0} K (DivisionRing.toDivInvMonoid.{0} K (Field.toDivisionRing.{0} K _inst_3)))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (algebraMap.coeHTCT.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))) _inst_4) r₁) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (algebraMap.coeHTCT.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))) _inst_4) g₁))) (HDiv.hDiv.{0, 0, 0} K K K (instHDiv.{0} K (DivInvMonoid.toHasDiv.{0} K (DivisionRing.toDivInvMonoid.{0} K (Field.toDivisionRing.{0} K _inst_3)))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (algebraMap.coeHTCT.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))) _inst_4) r₂) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (algebraMap.coeHTCT.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))) _inst_4) g₂)))))))))
+but is expected to have type
+ forall (R : Type) [_inst_1 : CommRing.{0} R] [_inst_2 : IsDomain.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))] (K : Type) [_inst_3 : Field.{0} K] [_inst_4 : Algebra.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_3)))] [_inst_5 : IsFractionRing.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) (Polynomial.commRing.{0} R _inst_1) K (Field.toCommRing.{0} K _inst_3) _inst_4] (f : Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) {g₁ : Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))} {g₂ : Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))}, (Polynomial.Monic.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)) g₁) -> (Polynomial.Monic.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)) g₂) -> (IsCoprime.{0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) g₁ g₂) -> (Exists.{1} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) (fun (q : Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) => Exists.{1} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) (fun (r₁ : Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) => Exists.{1} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) (fun (r₂ : Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) => And (LT.lt.{0} (WithBot.{0} Nat) (Preorder.toLT.{0} (WithBot.{0} Nat) (WithBot.preorder.{0} Nat (PartialOrder.toPreorder.{0} Nat (StrictOrderedSemiring.toPartialOrder.{0} Nat Nat.strictOrderedSemiring)))) (Polynomial.degree.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)) r₁) (Polynomial.degree.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)) g₁)) (And (LT.lt.{0} (WithBot.{0} Nat) (Preorder.toLT.{0} (WithBot.{0} Nat) (WithBot.preorder.{0} Nat (PartialOrder.toPreorder.{0} Nat (StrictOrderedSemiring.toPartialOrder.{0} Nat Nat.strictOrderedSemiring)))) (Polynomial.degree.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)) r₂) (Polynomial.degree.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)) g₂)) (Eq.{1} K (HDiv.hDiv.{0, 0, 0} K K K (instHDiv.{0} K (Field.toDiv.{0} K _inst_3)) (Algebra.cast.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_3))) _inst_4 f) (HMul.hMul.{0, 0, 0} K K K (instHMul.{0} K (NonUnitalNonAssocRing.toMul.{0} K (NonAssocRing.toNonUnitalNonAssocRing.{0} K (Ring.toNonAssocRing.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3)))))) (Algebra.cast.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_3))) _inst_4 g₁) (Algebra.cast.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_3))) _inst_4 g₂))) (HAdd.hAdd.{0, 0, 0} K K K (instHAdd.{0} K (Distrib.toAdd.{0} K (NonUnitalNonAssocSemiring.toDistrib.{0} K (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{0} K (NonAssocRing.toNonUnitalNonAssocRing.{0} K (Ring.toNonAssocRing.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3)))))))) (HAdd.hAdd.{0, 0, 0} K K K (instHAdd.{0} K (Distrib.toAdd.{0} K (NonUnitalNonAssocSemiring.toDistrib.{0} K (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{0} K (NonAssocRing.toNonUnitalNonAssocRing.{0} K (Ring.toNonAssocRing.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3)))))))) (Algebra.cast.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_3))) _inst_4 q) (HDiv.hDiv.{0, 0, 0} K K K (instHDiv.{0} K (Field.toDiv.{0} K _inst_3)) (Algebra.cast.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_3))) _inst_4 r₁) (Algebra.cast.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_3))) _inst_4 g₁))) (HDiv.hDiv.{0, 0, 0} K K K (instHDiv.{0} K (Field.toDiv.{0} K _inst_3)) (Algebra.cast.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_3))) _inst_4 r₂) (Algebra.cast.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_3))) _inst_4 g₂)))))))))
+Case conversion may be inaccurate. Consider using '#align div_eq_quo_add_rem_div_add_rem_div div_eq_quo_add_rem_div_add_rem_divₓ'. -/
/-- Let R be an integral domain and f, g₁, g₂ ∈ R[X]. Let g₁ and g₂ be monic and coprime.
Then, ∃ q, r₁, r₂ ∈ R[X] such that f / g₁g₂ = q + r₁/g₁ + r₂/g₂ and deg(r₁) < deg(g₁) and
deg(r₂) < deg(g₂).
@@ -89,6 +95,12 @@ section NDenominators
open BigOperators Classical
+/- warning: div_eq_quo_add_sum_rem_div -> div_eq_quo_add_sum_rem_div is a dubious translation:
+lean 3 declaration is
+ forall (R : Type) [_inst_1 : CommRing.{0} R] [_inst_2 : IsDomain.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))] (K : Type) [_inst_3 : Field.{0} K] [_inst_4 : Algebra.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3)))] [_inst_5 : IsFractionRing.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) (Polynomial.commRing.{0} R _inst_1) K (Field.toCommRing.{0} K _inst_3) _inst_4] (f : Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) {ι : Type.{u1}} {g : ι -> (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)))} {s : Finset.{u1} ι}, (forall (i : ι), (Membership.Mem.{u1, u1} ι (Finset.{u1} ι) (Finset.hasMem.{u1} ι) i s) -> (Polynomial.Monic.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)) (g i))) -> (Set.Pairwise.{u1} ι ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (Finset.{u1} ι) (Set.{u1} ι) (HasLiftT.mk.{succ u1, succ u1} (Finset.{u1} ι) (Set.{u1} ι) (CoeTCₓ.coe.{succ u1, succ u1} (Finset.{u1} ι) (Set.{u1} ι) (Finset.Set.hasCoeT.{u1} ι))) s) (fun (i : ι) (j : ι) => IsCoprime.{0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (g i) (g j))) -> (Exists.{1} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) (fun (q : Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) => Exists.{succ u1} (ι -> (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)))) (fun (r : ι -> (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)))) => And (forall (i : ι), (Membership.Mem.{u1, u1} ι (Finset.{u1} ι) (Finset.hasMem.{u1} ι) i s) -> (LT.lt.{0} (WithBot.{0} Nat) (Preorder.toLT.{0} (WithBot.{0} Nat) (WithBot.preorder.{0} Nat (PartialOrder.toPreorder.{0} Nat (OrderedCancelAddCommMonoid.toPartialOrder.{0} Nat (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{0} Nat Nat.strictOrderedSemiring))))) (Polynomial.degree.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)) (r i)) (Polynomial.degree.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)) (g i)))) (Eq.{1} K (HDiv.hDiv.{0, 0, 0} K K K (instHDiv.{0} K (DivInvMonoid.toHasDiv.{0} K (DivisionRing.toDivInvMonoid.{0} K (Field.toDivisionRing.{0} K _inst_3)))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (algebraMap.coeHTCT.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))) _inst_4) f) (Finset.prod.{0, u1} K ι (CommRing.toCommMonoid.{0} K (Field.toCommRing.{0} K _inst_3)) s (fun (i : ι) => (fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (algebraMap.coeHTCT.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))) _inst_4) (g i)))) (HAdd.hAdd.{0, 0, 0} K K K (instHAdd.{0} K (Distrib.toHasAdd.{0} K (Ring.toDistrib.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (algebraMap.coeHTCT.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))) _inst_4) q) (Finset.sum.{0, u1} K ι (AddCommGroup.toAddCommMonoid.{0} K (NonUnitalNonAssocRing.toAddCommGroup.{0} K (NonAssocRing.toNonUnitalNonAssocRing.{0} K (Ring.toNonAssocRing.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3)))))) s (fun (i : ι) => HDiv.hDiv.{0, 0, 0} K K K (instHDiv.{0} K (DivInvMonoid.toHasDiv.{0} K (DivisionRing.toDivInvMonoid.{0} K (Field.toDivisionRing.{0} K _inst_3)))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (algebraMap.coeHTCT.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))) _inst_4) (r i)) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (algebraMap.coeHTCT.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3))) _inst_4) (g i)))))))))
+but is expected to have type
+ forall (R : Type) [_inst_1 : CommRing.{0} R] [_inst_2 : IsDomain.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))] (K : Type) [_inst_3 : Field.{0} K] [_inst_4 : Algebra.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_3)))] [_inst_5 : IsFractionRing.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) (Polynomial.commRing.{0} R _inst_1) K (Field.toCommRing.{0} K _inst_3) _inst_4] (f : Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) {ι : Type.{u1}} {g : ι -> (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)))} {s : Finset.{u1} ι}, (forall (i : ι), (Membership.mem.{u1, u1} ι (Finset.{u1} ι) (Finset.instMembershipFinset.{u1} ι) i s) -> (Polynomial.Monic.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)) (g i))) -> (Set.Pairwise.{u1} ι (Finset.toSet.{u1} ι s) (fun (i : ι) (j : ι) => IsCoprime.{0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (g i) (g j))) -> (Exists.{1} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) (fun (q : Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) => Exists.{succ u1} (ι -> (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)))) (fun (r : ι -> (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)))) => And (forall (i : ι), (Membership.mem.{u1, u1} ι (Finset.{u1} ι) (Finset.instMembershipFinset.{u1} ι) i s) -> (LT.lt.{0} (WithBot.{0} Nat) (Preorder.toLT.{0} (WithBot.{0} Nat) (WithBot.preorder.{0} Nat (PartialOrder.toPreorder.{0} Nat (StrictOrderedSemiring.toPartialOrder.{0} Nat Nat.strictOrderedSemiring)))) (Polynomial.degree.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)) (r i)) (Polynomial.degree.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1)) (g i)))) (Eq.{1} K (HDiv.hDiv.{0, 0, 0} K K K (instHDiv.{0} K (Field.toDiv.{0} K _inst_3)) (Algebra.cast.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_3))) _inst_4 f) (Finset.prod.{0, u1} K ι (CommRing.toCommMonoid.{0} K (Field.toCommRing.{0} K _inst_3)) s (fun (i : ι) => Algebra.cast.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_3))) _inst_4 (g i)))) (HAdd.hAdd.{0, 0, 0} K K K (instHAdd.{0} K (Distrib.toAdd.{0} K (NonUnitalNonAssocSemiring.toDistrib.{0} K (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{0} K (NonAssocRing.toNonUnitalNonAssocRing.{0} K (Ring.toNonAssocRing.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3)))))))) (Algebra.cast.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_3))) _inst_4 q) (Finset.sum.{0, u1} K ι (NonUnitalNonAssocSemiring.toAddCommMonoid.{0} K (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{0} K (NonAssocRing.toNonUnitalNonAssocRing.{0} K (Ring.toNonAssocRing.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_3)))))) s (fun (i : ι) => HDiv.hDiv.{0, 0, 0} K K K (instHDiv.{0} K (Field.toDiv.{0} K _inst_3)) (Algebra.cast.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_3))) _inst_4 (r i)) (Algebra.cast.{0, 0} (Polynomial.{0} R (Ring.toSemiring.{0} R (CommRing.toRing.{0} R _inst_1))) K (Polynomial.commSemiring.{0} R (CommRing.toCommSemiring.{0} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_3))) _inst_4 (g i)))))))))
+Case conversion may be inaccurate. Consider using '#align div_eq_quo_add_sum_rem_div div_eq_quo_add_sum_rem_divₓ'. -/
/-- Let R be an integral domain and f ∈ R[X]. Let s be a finite index set.
Then, a fraction of the form f / ∏ (g i) can be rewritten as q + ∑ (r i) / (g i), where
deg(r i) < deg(g i), provided that the g i are monic and pairwise coprime.
mathlib commit https://github.com/leanprover-community/mathlib/commit/bd9851ca476957ea4549eb19b40e7b5ade9428cc
Data
(#11751)
Polynomial
and MvPolynomial
are algebraic objects, hence should be under Algebra
(or at least not under Data
)
@@ -3,7 +3,7 @@ Copyright (c) Sidharth Hariharan. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kevin Buzzard, Sidharth Hariharan
-/
-import Mathlib.Data.Polynomial.Div
+import Mathlib.Algebra.Polynomial.Div
import Mathlib.Logic.Function.Basic
import Mathlib.RingTheory.Localization.FractionRing
import Mathlib.Tactic.FieldSimp
Homogenises porting notes via capitalisation and addition of whitespace.
It makes the following changes:
@@ -50,7 +50,7 @@ variable (K : Type) [Field K] [Algebra R[X] K] [IsFractionRing R[X] K]
section TwoDenominators
---Porting note: added for scoped `Algebra.cast` instance
+-- Porting note: added for scoped `Algebra.cast` instance
open algebraMap
/-- Let R be an integral domain and f, g₁, g₂ ∈ R[X]. Let g₁ and g₂ be monic and coprime.
@@ -85,7 +85,7 @@ section NDenominators
open BigOperators
---Porting note: added for scoped `Algebra.cast` instance
+-- Porting note: added for scoped `Algebra.cast` instance
open algebraMap
/-- Let R be an integral domain and f ∈ R[X]. Let s be a finite index set.
@@ -4,7 +4,6 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kevin Buzzard, Sidharth Hariharan
-/
import Mathlib.Data.Polynomial.Div
-import Mathlib.Data.ZMod.Basic
import Mathlib.Logic.Function.Basic
import Mathlib.RingTheory.Localization.FractionRing
import Mathlib.Tactic.FieldSimp
ofNat
support (#8002)
This PR adds simp lemmas for OfNat.ofNat n : PartENat
, 0 : PartENat
, and 1 : PartENat
in every place where there was a simp lemma for ((n : ℕ) : PartENat)
. This is necessary for simp confluence in the presence of lemmas such as Nat.cast_ofNat
. In addition, instances for CharZero
and ZeroLEOneClass
are provided so that the lemmas from Data/Nat/Cast/Order.lean
will apply, golfing some proofs.
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
@@ -69,10 +69,10 @@ theorem div_eq_quo_add_rem_div_add_rem_div (f : R[X]) {g₁ g₂ : R[X]} (hg₁
degree_modByMonic_lt _ hg₂, _⟩
have hg₁' : (↑g₁ : K) ≠ 0 := by
norm_cast
- exact hg₁.ne_zero_of_ne zero_ne_one
+ exact hg₁.ne_zero
have hg₂' : (↑g₂ : K) ≠ 0 := by
norm_cast
- exact hg₂.ne_zero_of_ne zero_ne_one
+ exact hg₂.ne_zero
have hfc := modByMonic_add_div (f * c) hg₂
have hfd := modByMonic_add_div (f * d) hg₁
field_simp
open Classical
(#7706)
This doesn't change any polynomial operations, but:
Decidable
values computable (otherwise, they're pointless!)This is exhaustive, within the directories it touches.
Once again, the use of letI := Classical.decEq R
instead of classical
here is because of the weird style of proofs in these files, where if
is preferred to by_cases
.
@@ -47,8 +47,6 @@ variable (R : Type) [CommRing R] [IsDomain R]
open Polynomial
-open Polynomial
-
variable (K : Type) [Field K] [Algebra R[X] K] [IsFractionRing R[X] K]
section TwoDenominators
@@ -86,7 +84,7 @@ end TwoDenominators
section NDenominators
-open BigOperators Classical
+open BigOperators
--Porting note: added for scoped `Algebra.cast` instance
open algebraMap
@@ -100,6 +98,7 @@ theorem div_eq_quo_add_sum_rem_div (f : R[X]) {ι : Type*} {g : ι → R[X]} {s
∃ (q : R[X]) (r : ι → R[X]),
(∀ i ∈ s, (r i).degree < (g i).degree) ∧
((↑f : K) / ∏ i in s, ↑(g i)) = ↑q + ∑ i in s, (r i : K) / (g i : K) := by
+ classical
induction' s using Finset.induction_on with a b hab Hind f generalizing f
· refine' ⟨f, fun _ : ι => (0 : R[X]), fun i => _, by simp⟩
rintro ⟨⟩
Type _
and Sort _
(#6499)
We remove all possible occurences of Type _
and Sort _
in favor of Type*
and Sort*
.
This has nice performance benefits.
@@ -95,7 +95,7 @@ open algebraMap
Then, a fraction of the form f / ∏ (g i) can be rewritten as q + ∑ (r i) / (g i), where
deg(r i) < deg(g i), provided that the g i are monic and pairwise coprime.
-/
-theorem div_eq_quo_add_sum_rem_div (f : R[X]) {ι : Type _} {g : ι → R[X]} {s : Finset ι}
+theorem div_eq_quo_add_sum_rem_div (f : R[X]) {ι : Type*} {g : ι → R[X]} {s : Finset ι}
(hg : ∀ i ∈ s, (g i).Monic) (hcop : Set.Pairwise ↑s fun i j => IsCoprime (g i) (g j)) :
∃ (q : R[X]) (r : ι → R[X]),
(∀ i ∈ s, (r i).degree < (g i).degree) ∧
@@ -2,11 +2,6 @@
Copyright (c) Sidharth Hariharan. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kevin Buzzard, Sidharth Hariharan
-
-! This file was ported from Lean 3 source module data.polynomial.partial_fractions
-! leanprover-community/mathlib commit 6e70e0d419bf686784937d64ed4bfde866ff229e
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.Data.Polynomial.Div
import Mathlib.Data.ZMod.Basic
@@ -15,6 +10,8 @@ import Mathlib.RingTheory.Localization.FractionRing
import Mathlib.Tactic.FieldSimp
import Mathlib.Tactic.LinearCombination
+#align_import data.polynomial.partial_fractions from "leanprover-community/mathlib"@"6e70e0d419bf686784937d64ed4bfde866ff229e"
+
/-!
# Partial fractions
at
and goals (#5387)
Changes are of the form
some_tactic at h⊢
-> some_tactic at h ⊢
some_tactic at h
-> some_tactic at h
@@ -126,7 +126,7 @@ theorem div_eq_quo_add_sum_rem_div (f : R[X]) {ι : Type _} {g : ι → R[X]} {s
exact hdeg₁
· intro hi
exact hrdeg i (Finset.mem_of_mem_insert_of_ne hi h1)
- norm_cast at hf IH⊢
+ norm_cast at hf IH ⊢
rw [Finset.prod_insert hab, hf, IH, Finset.sum_insert hab, if_pos rfl]
trans (↑(q₀ + q : R[X]) : K) + (↑r₁ / ↑(g a) + ∑ i : ι in b, (r i : K) / (g i : K))
· push_cast
@@ -100,7 +100,7 @@ deg(r i) < deg(g i), provided that the g i are monic and pairwise coprime.
-/
theorem div_eq_quo_add_sum_rem_div (f : R[X]) {ι : Type _} {g : ι → R[X]} {s : Finset ι}
(hg : ∀ i ∈ s, (g i).Monic) (hcop : Set.Pairwise ↑s fun i j => IsCoprime (g i) (g j)) :
- ∃ (q : R[X])(r : ι → R[X]),
+ ∃ (q : R[X]) (r : ι → R[X]),
(∀ i ∈ s, (r i).degree < (g i).degree) ∧
((↑f : K) / ∏ i in s, ↑(g i)) = ↑q + ∑ i in s, (r i : K) / (g i : K) := by
induction' s using Finset.induction_on with a b hab Hind f generalizing f
The unported dependencies are