/- 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. -/ module public import Mathlib.Algebra.QuadraticAlgebra.Basic public import Mathlib.Algebra.Squarefree.Basicpublic sectionnamespace QuadraticAlgebravariable {R S : Type*} [CommSemiring R] [CommRing S] [Algebra R S]instance (a b : R) : Algebra (QuadraticAlgebra R a b) (QuadraticAlgebra S (algebraMap R S a) (algebraMap R S b)) := (lift ω, R:Type u_1S:Type u_2inst✝²:CommSemiring Rinst✝¹:CommRing Sinst✝:Algebra R Sa:Rb:Rω * ω = a 1 + b ω All goals completed! 🐙).toRingHom.toAlgebra@[simp] lemma algebraMap_omega (a b : R) : algebraMap (QuadraticAlgebra R a b) (QuadraticAlgebra S (algebraMap R S a) (algebraMap R S b)) ω = ω := R:Type u_1S:Type u_2inst✝²:CommSemiring Rinst✝¹:CommRing Sinst✝:Algebra R Sa:Rb:R(algebraMap (QuadraticAlgebra R a b) (QuadraticAlgebra S ((algebraMap R S) a) ((algebraMap R S) b))) ω = ω R:Type u_1S:Type u_2inst✝²:CommSemiring Rinst✝¹:CommRing Sinst✝:Algebra R Sa:Rb:Rω = (lift ω, ) ω All goals completed! 🐙instance (a b : ) : Algebra (QuadraticAlgebra a b) (QuadraticAlgebra S a b) := (lift ω, R:Type u_1S:Type u_2inst✝²:CommSemiring Rinst✝¹:CommRing Sinst✝:Algebra R Sa:b:ω * ω = a 1 + b ω All goals completed! 🐙).toRingHom.toAlgebra@[simp] lemma algebraMap_omega' (a b : ) : algebraMap (QuadraticAlgebra a b) (QuadraticAlgebra S a b) ω = ω := S:Type u_2inst✝:CommRing Sa:b:(algebraMap (QuadraticAlgebra a b) (QuadraticAlgebra S a b)) ω = ω All goals completed! 🐙instance (a : ) : Algebra (QuadraticAlgebra a 0) (QuadraticAlgebra S a 0) := (lift ω, R:Type u_1S:Type u_2inst✝²:CommSemiring Rinst✝¹:CommRing Sinst✝:Algebra R Sa:ω * ω = a 1 + 0 ω All goals completed! 🐙).toRingHom.toAlgebra@[simp] lemma algebraMap_omega'' (a : ) : algebraMap (QuadraticAlgebra a 0) (QuadraticAlgebra S a 0) ω = ω := S:Type u_2inst✝:CommRing Sa:(algebraMap (QuadraticAlgebra a 0) (QuadraticAlgebra S (↑a) 0)) ω = ω S:Type u_2inst✝:CommRing Sa:ω = (lift ω, ) ω All goals completed! 🐙variable {d : } [Fact <| Squarefree d] [Fact <| d 1]R:Type u_1S:Type u_2inst✝⁴:CommSemiring Rinst✝³:CommRing Sinst✝²:Algebra R Sd:inst✝¹:Fact (Squarefree d)inst✝:Fact (d 1)r:h:r ^ 2 = d + 0 * rs:hs:d = s * sFalse All goals completed! 🐙end QuadraticAlgebra