@@ -100,7 +100,7 @@ VerifiedMonad Maybe where
100 monadAssociativity (Just x) f g = Refl
100 monadAssociativity (Just x) f g = Refl
102interface Semigroup a => VerifiedSemigroup a where
102interface Semigroup a => VerifiedSemigroup a where
103− total semigroupOpIsAssociative : (l, c, r : a) -> l <+> (c <+> r) = (l <+> c) <+> r
103+ semigroupOpIsAssociative : (l, c, r : a) -> l <+> (c <+> r) = (l <+> c) <+> r
105implementation VerifiedSemigroup (List a) where
105implementation VerifiedSemigroup (List a) where
106 semigroupOpIsAssociative = appendAssociative
106 semigroupOpIsAssociative = appendAssociative
@@ -118,8 +118,8 @@ implementation VerifiedSemigroup (List a) where
118 semigroupOpIsAssociative = multAssociativeZ
118 semigroupOpIsAssociative = multAssociativeZ
120interface (VerifiedSemigroup a, Monoid a) => VerifiedMonoid a where
120interface (VerifiedSemigroup a, Monoid a) => VerifiedMonoid a where
121− total monoidNeutralIsNeutralL : (l : a) -> l <+> Algebra.neutral = l
121+ monoidNeutralIsNeutralL : (l : a) -> l <+> Algebra.neutral = l
122− total monoidNeutralIsNeutralR : (r : a) -> Algebra.neutral <+> r = r
122+ monoidNeutralIsNeutralR : (r : a) -> Algebra.neutral <+> r = r
124[PlusNatMonoidV] VerifiedMonoid Nat using PlusNatSemiV, PlusNatMonoid where
124[PlusNatMonoidV] VerifiedMonoid Nat using PlusNatSemiV, PlusNatMonoid where
125 monoidNeutralIsNeutralL = plusZeroRightNeutral
125 monoidNeutralIsNeutralL = plusZeroRightNeutral
@@ -142,8 +142,8 @@ implementation VerifiedMonoid (List a) where
142 monoidNeutralIsNeutralR xs = Refl
142 monoidNeutralIsNeutralR xs = Refl
144interface (VerifiedMonoid a, Group a) => VerifiedGroup a where
144interface (VerifiedMonoid a, Group a) => VerifiedGroup a where
145− total groupInverseIsInverseL : (l : a) -> l <+> inverse l = Algebra.neutral
145+ groupInverseIsInverseL : (l : a) -> l <+> inverse l = Algebra.neutral
146− total groupInverseIsInverseR : (r : a) -> inverse r <+> r = Algebra.neutral
146+ groupInverseIsInverseR : (r : a) -> inverse r <+> r = Algebra.neutral
148VerifiedGroup ZZ using PlusZZMonoidV where
148VerifiedGroup ZZ using PlusZZMonoidV where
149 groupInverseIsInverseL k = rewrite sym $ multCommutativeZ (NegS 0) k in
149 groupInverseIsInverseL k = rewrite sym $ multCommutativeZ (NegS 0) k in
@@ -156,15 +156,15 @@ VerifiedGroup ZZ using PlusZZMonoidV where
156 plusNegateInverseRZ k
156 plusNegateInverseRZ k
158interface (VerifiedGroup a, AbelianGroup a) => VerifiedAbelianGroup a where
158interface (VerifiedGroup a, AbelianGroup a) => VerifiedAbelianGroup a where
159− total abelianGroupOpIsCommutative : (l, r : a) -> l <+> r = r <+> l
159+ abelianGroupOpIsCommutative : (l, r : a) -> l <+> r = r <+> l
161VerifiedAbelianGroup ZZ where
161VerifiedAbelianGroup ZZ where
162 abelianGroupOpIsCommutative = plusCommutativeZ
162 abelianGroupOpIsCommutative = plusCommutativeZ
164interface (VerifiedAbelianGroup a, Ring a) => VerifiedRing a where
164interface (VerifiedAbelianGroup a, Ring a) => VerifiedRing a where
165− total ringOpIsAssociative : (l, c, r : a) -> l <.> (c <.> r) = (l <.> c) <.> r
165+ ringOpIsAssociative : (l, c, r : a) -> l <.> (c <.> r) = (l <.> c) <.> r
166− total ringOpIsDistributiveL : (l, c, r : a) -> l <.> (c <+> r) = (l <.> c) <+> (l <.> r)
166+ ringOpIsDistributiveL : (l, c, r : a) -> l <.> (c <+> r) = (l <.> c) <+> (l <.> r)
167− total ringOpIsDistributiveR : (l, c, r : a) -> (l <+> c) <.> r = (l <.> r) <+> (c <.> r)
167+ ringOpIsDistributiveR : (l, c, r : a) -> (l <+> c) <.> r = (l <.> r) <+> (c <.> r)
169VerifiedRing ZZ where
169VerifiedRing ZZ where
170 ringOpIsAssociative = multAssociativeZ
170 ringOpIsAssociative = multAssociativeZ
@@ -172,19 +172,19 @@ VerifiedRing ZZ where
172 ringOpIsDistributiveR = multDistributesOverPlusLeftZ
172 ringOpIsDistributiveR = multDistributesOverPlusLeftZ
174interface (VerifiedRing a, RingWithUnity a) => VerifiedRingWithUnity a where
174interface (VerifiedRing a, RingWithUnity a) => VerifiedRingWithUnity a where
175− total ringWithUnityIsUnityL : (l : a) -> l <.> Algebra.unity = l
175+ ringWithUnityIsUnityL : (l : a) -> l <.> Algebra.unity = l
176− total ringWithUnityIsUnityR : (r : a) -> Algebra.unity <.> r = r
176+ ringWithUnityIsUnityR : (r : a) -> Algebra.unity <.> r = r
178VerifiedRingWithUnity ZZ where
178VerifiedRingWithUnity ZZ where
179 ringWithUnityIsUnityL = multOneRightNeutralZ
179 ringWithUnityIsUnityL = multOneRightNeutralZ
180 ringWithUnityIsUnityR = multOneLeftNeutralZ
180 ringWithUnityIsUnityR = multOneLeftNeutralZ
182interface JoinSemilattice a => VerifiedJoinSemilattice a where
182interface JoinSemilattice a => VerifiedJoinSemilattice a where
183− total joinSemilatticeJoinIsAssociative : (l, c, r : a) -> join l (join c r) = join (join l c) r
183+ joinSemilatticeJoinIsAssociative : (l, c, r : a) -> join l (join c r) = join (join l c) r
184− total joinSemilatticeJoinIsCommutative : (l, r : a) -> join l r = join r l
184+ joinSemilatticeJoinIsCommutative : (l, r : a) -> join l r = join r l
185− total joinSemilatticeJoinIsIdempotent : (e : a) -> join e e = e
185+ joinSemilatticeJoinIsIdempotent : (e : a) -> join e e = e
187interface MeetSemilattice a => VerifiedMeetSemilattice a where
187interface MeetSemilattice a => VerifiedMeetSemilattice a where
188− total meetSemilatticeMeetIsAssociative : (l, c, r : a) -> meet l (meet c r) = meet (meet l c) r
188+ meetSemilatticeMeetIsAssociative : (l, c, r : a) -> meet l (meet c r) = meet (meet l c) r
189− total meetSemilatticeMeetIsCommutative : (l, r : a) -> meet l r = meet r l
189+ meetSemilatticeMeetIsCommutative : (l, r : a) -> meet l r = meet r l
190− total meetSemilatticeMeetIsIdempotent : (e : a) -> meet e e = e
190+ meetSemilatticeMeetIsIdempotent : (e : a) -> meet e e = e