lean4-htt/tests/pkg/ver_clash/DiamondExample-A/DiamondExampleA/Ring/Defs.lean
Mac Malone 2b85e29cc9
test: version clash w/ diamond deps (#11155)
This PR adds a test replicating Kim's diamond dependency example.

The top-level package, `D`, depends on two intermediate packages, `B`
and `C`, which each require semantically different versions of another
package, `A`. The portion of `A` that `B` and `C` publicly use is
unchanged across the versions, but they both privately make use of
changed API. Currently, this causes a version clash. This will be made
to work without error later this quarter.
2025-11-13 05:40:56 +00:00

9 lines
340 B
Text

module
public class Ring (A : Type) extends Add A, Mul A, Neg A, Zero A, One A where
add_assoc : ∀ a b c : A, a + b + c = a + (b + c)
add_comm : ∀ a b : A, a + b = b + a
add_zero : ∀ a : A, a + 0 = a
add_neg : ∀ a : A, a + -a = 0
mul_assoc : ∀ a b c : A, a * b * c = a * (b * c)
mul_comm : ∀ a b : A, a * b = b * a