Zulip Chat Archive

Stream: mathlib4

Topic: Prove algebraic class of subtype via closure


Bolton Bailey (Nov 01 2023 at 20:11):

I would like to complete

import Mathlib.Algebra.Tropical.Basic
import Mathlib.Data.Polynomial.Degree.Definitions

def TropicallyBoundPolynomials (R) [Semiring R] : Type :=
{ p : (Polynomial R × Tropical (OrderDual )) // p.1.natDegree  p.2.untrop }

instance [Semiring R] : Semiring (TropicallyBoundPolynomials R) := by
  sorry

Is there some way I can do this just by proving that the subtype is closed under 0, + and *?

Junyan Xu (Nov 01 2023 at 20:23):

Construct a docs#Subsemiring with the set
{ p : (Polynomial R × Tropical (OrderDual ℕ)) | p.1.natDegree ≤ p.2.untrop }
as the carrier, and it automatically gets a Semiring instance.

Bolton Bailey (Nov 01 2023 at 20:59):

Hmm, unfortunately this turned out not to be a Semiring like I thought. Is there something similar for Distrib?

Kevin Buzzard (Nov 02 2023 at 11:03):

I'm afraid mathlib doesn't have subdistribs. But distrib is a Prop-valued class so what even would that mean?

Eric Wieser (Nov 02 2023 at 11:06):

But distrib is a Prop-valued class

No it isn't: docs#Distrib


Last updated: Dec 20 2023 at 11:08 UTC