/-
Copyright 2025 The Formal Conjectures Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-/modulepublicimportMathlib.Algebra.QuadraticAlgebra.BasicpublicimportMathlib.Algebra.Squarefree.BasicpublicsectionnamespaceQuadraticAlgebravariable{RS:Type*}[CommSemiringR][CommRingS][AlgebraRS]instance(ab:R):Algebra(QuadraticAlgebraRab)(QuadraticAlgebraS(algebraMapRSa)(algebraMapRSb)):=(lift⟨ω,R:Type u_1S:Type u_2inst✝²:CommSemiringRinst✝¹:CommRingSinst✝:AlgebraRSa:Rb:R⊢ ω*ω=a•1+b•ωAll goals completed! 🐙⟩).toRingHom.toAlgebra@[simp]lemmaalgebraMap_omega(ab:R):algebraMap(QuadraticAlgebraRab)(QuadraticAlgebraS(algebraMapRSa)(algebraMapRSb))ω=ω:=R:Type u_1S:Type u_2inst✝²:CommSemiringRinst✝¹:CommRingSinst✝:AlgebraRSa:Rb:R⊢ (algebraMap(QuadraticAlgebraRab)(QuadraticAlgebraS((algebraMapRS)a)((algebraMapRS)b)))ω=ωR:Type u_1S:Type u_2inst✝²:CommSemiringRinst✝¹:CommRingSinst✝:AlgebraRSa:Rb:R⊢ ω=(lift⟨ω,⋯⟩)ωAll goals completed! 🐙instance(ab:ℤ):Algebra(QuadraticAlgebraℤab)(QuadraticAlgebraSab):=(lift⟨ω,R:Type u_1S:Type u_2inst✝²:CommSemiringRinst✝¹:CommRingSinst✝:AlgebraRSa:ℤb:ℤ⊢ ω*ω=a•1+b•ωAll goals completed! 🐙⟩).toRingHom.toAlgebra@[simp]lemmaalgebraMap_omega'(ab:ℤ):algebraMap(QuadraticAlgebraℤab)(QuadraticAlgebraSab)ω=ω:=S:Type u_2inst✝:CommRingSa:ℤb:ℤ⊢ (algebraMap(QuadraticAlgebraℤab)(QuadraticAlgebraS↑a↑b))ω=ωAll goals completed! 🐙instance(a:ℤ):Algebra(QuadraticAlgebraℤa0)(QuadraticAlgebraSa0):=(lift⟨ω,R:Type u_1S:Type u_2inst✝²:CommSemiringRinst✝¹:CommRingSinst✝:AlgebraRSa:ℤ⊢ ω*ω=a•1+0•ωAll goals completed! 🐙⟩).toRingHom.toAlgebra@[simp]lemmaalgebraMap_omega''(a:ℤ):algebraMap(QuadraticAlgebraℤa0)(QuadraticAlgebraSa0)ω=ω:=S:Type u_2inst✝:CommRingSa:ℤ⊢ (algebraMap(QuadraticAlgebraℤa0)(QuadraticAlgebraS(↑a)0))ω=ωS:Type u_2inst✝:CommRingSa:ℤ⊢ ω=(lift⟨ω,⋯⟩)ωAll goals completed! 🐙variable{d:ℤ}[Fact<|Squarefreed][Fact<|d≠1]R:Type u_1S:Type u_2inst✝⁴:CommSemiringRinst✝³:CommRingSinst✝²:AlgebraRSd:ℤinst✝¹:Fact(Squarefreed)inst✝:Fact(d≠1)r:ℚh:r^2=↑d+0*rs:ℤhs:d=s*s⊢ Falsegrind[Int.isUnit_mul_self<|(Fact.out:Squarefreed)shs.symm.dvd,(Fact.out:d≠1)]All goals completed! 🐙endQuadraticAlgebra