Theory Presentation Combinators

Theory Presentation Combinators

Theory Presentation Combinators Jacques Carette, and Russell O'Connor McMaster University CICM 2012, Bremen, Germany 12th July 2012 Motivation As part of MathScheme, we wish to efficiently encode mathematical knowledge. 1. Efficient for the library developper 2. Efficient for the user 3. Efficient for processing Focus first on Theory Presentations I Over a (dependently) typed expression language I Syntax for meaningful content Carette, O'Connor Theory Presentation Combinators 2/18 Theories Monoid := Theory f U: type ; ∗ : (U, U) −> U; e : U; axiom rightIdentity ∗ e : f o r a l l x :U. x∗ e = x ; axiom leftIdentity ∗ e : f o r a l l x :U. e ∗x = x ; axiom associative ∗ : f o r a l l x , y , z :U. ( x∗y )∗ z=x ∗( y∗ z ) g Carette, O'Connor Theory Presentation Combinators 3/18 Theories Monoid := Theory f U: type ; ∗ : (U, U) −> U; e : U; axiom rightIdentity ∗ e : f o r a l l x :U. x∗ e = x ; axiom leftIdentity ∗ e : f o r a l l x :U. e ∗x = x ; axiom associative ∗ : f o r a l l x , y , z :U. ( x∗y )∗ z=x ∗( y∗ z ) g CommutativeMonoid := Theory f U: type ; ∗ : (U, U) −> U; e : U; axiom rightIdentity ∗ e : f o r a l l x :U. x∗ e = x ; axiom leftIdentity ∗ e : f o r a l l x :U. e ∗x = x ; axiom associative ∗ : f o r a l l x , y , z :U. ( x∗y )∗ z=x ∗( y∗ z ) axiom commutative ∗ : f o r a l l x , y , z :U. x∗y=y∗x g Carette, O'Connor Theory Presentation Combinators 3/18 Theories Monoid := Theory f U: type ; ∗ : (U, U) −> U; e : U; axiom rightIdentity ∗ e : f o r a l l x :U. x∗ e = x ; axiom leftIdentity ∗ e : f o r a l l x :U. e ∗x = x ; axiom associative ∗ : f o r a l l x , y , z :U. ( x∗y )∗ z=x ∗( y∗ z ) g AdditiveMonoid := Theory f U: type ; + : (U, U) −> U; 0 : U; axiom rightIdentity + 0 : f o r a l l x :U. x+0 = x ; axiom leftIdentity + 0 : f o r a l l x :U. 0+x = x ; axiom associative + : f o r a l l x,y,z:U. (x+y)+z=x+(y+z) g Carette, O'Connor Theory Presentation Combinators 3/18 Theories Monoid := Theory f U: type ; ∗ : (U, U) −> U; e : U; axiom rightIdentity ∗ e : f o r a l l x :U. x∗ e = x ; axiom leftIdentity ∗ e : f o r a l l x :U. e ∗x = x ; axiom associative ∗ : f o r a l l x , y , z :U. ( x∗y )∗ z=x ∗( y∗ z ) g AdditiveCommutativeMonoid := Theory f U: type ; + : (U, U) −> U; 0 : U; axiom rightIdentity + 0 : f o r a l l x :U. x+0 = x ; axiom leftIdentity + 0 : f o r a l l x :U. 0+x = x ; axiom associative + : f o r a l l x,y,z:U. (x+y)+z=x+(y+z) axiom commutative + : f o r a l l x , y , z :U. x+y=y+x g Carette, O'Connor Theory Presentation Combinators 3/18 Renaming: AdditiveMonoid := Monoid[ ∗ j−> +, e j−> 0 ] Combination: AdditiveCommutativeMonoid := combine AdditiveMonoid , CommutativeMonoid over Monoid Combinators for theories Extension: CommutativeMonoid := Monoid extended by f axiom commutative ∗ : f o r a l l x , y , z :U. x∗y=y∗x g Carette, O'Connor Theory Presentation Combinators 4/18 Combination: AdditiveCommutativeMonoid := combine AdditiveMonoid , CommutativeMonoid over Monoid Combinators for theories Extension: CommutativeMonoid := Monoid extended by f axiom commutative ∗ : f o r a l l x , y , z :U. x∗y=y∗x g Renaming: AdditiveMonoid := Monoid[ ∗ j−> +, e j−> 0 ] Carette, O'Connor Theory Presentation Combinators 4/18 Combinators for theories Extension: CommutativeMonoid := Monoid extended by f axiom commutative ∗ : f o r a l l x , y , z :U. x∗y=y∗x g Renaming: AdditiveMonoid := Monoid[ ∗ j−> +, e j−> 0 ] Combination: AdditiveCommutativeMonoid := combine AdditiveMonoid , CommutativeMonoid over Monoid Carette, O'Connor Theory Presentation Combinators 4/18 A fraction of the Algebraic Zoo ModalAlgebra ModalFixes ModalDistributes KleeneLattice VectorSpace BooleanAlgebra UnaryDistributes DeMorganAlgebra PseudoComplement RModule GoedelAlgebra FixedPoint OckhamAlgebra RightRModule LeftRModule CommutativeRingAction HeytingAlgebra DualdeMorgan RightRingAction LeftRingAction ImplicationUnipotentMagma Field ModularOrthoLattice BoundedDistributiveLattice LeftDistributiveImplication Implicative AnddeMorgan OrdeMorgan PreRightRingAction PreLeftRingAction OrthoLattice IntegralDomain BoundedModularLattice ComplementedLattice BooleanRing LeftImplicative RightImplicative PrimeRingoidSig MultRightMonoidAction PrimeAdditiveGroup MultMonoidAction DivisionRing Domain BoundedLattice CommutativeRing DistributiveLattice MeetImplicativeSig RightMonoid1Action LeftMonoid1Action OrthoModularLattice KleeneAlgebra Ring NonassociativeRing NoZeroDivisors ModularLattice BoundedJoinLattice BoundedMeetLattice OrthoComplement StarSemiring MoufangLoop Dioid Rng NonassociativeNondistributiveRing Modularity BoundedJoinSemilattice Lattice Asteration AbelianGroup Loop Semiring NearRing SemiRng MoufangIdentity AbelianAdditiveGroup Semifield BoundedMeetSemilattice LeftAbsorptionOp DualSemilattices IdempotentAdditiveMagma LeftAsteration RightAsteration RightGroupAction ModalAlgebraSig LeftGroupAction Group1 OrthoLatticeSig RightCommutator LeftCommutator Left0 QuasiGroup AdditiveCommutativeMonoid AdditiveGroup NearSemifield HeytingAlgebraSig CommutativeMonoid1 Ringoid LeftAbsorption JoinSemilattice StarSemiringSig LogicAlgebra RightMonoidAction LeftMonoidAction Group Ringoid01Sig Monoid1 AdditiveMonoid BooleanGroup Sloop LeftLoop RightQuasiGroup CommutativeMonoid NearSemiring CommutativeAdditiveMagma LeftRingoid MeetSemilattice Quandle Inverse ComplementRightZero RightMagmaAction RightUnitalAction Right0 InvolutiveSemigroup Zero LeftUnitalAction LeftSemigroupAction Ringoid1Sig Monoid UnipotentPointedMagma PointedSteinerMagma RightCancellative RightCancellativeOp LeftQuasiGroup AdditiveSemigroup Ringoid0Sig RightRingoid Squag CommutativeBand RectangularBand NormalBand Directoid LeftSpindle RightSpindle Rack Shelf Chain InvolutiveMagma RightInverse LeftInverse RightUnitalActionSig RightZero LeftZero LeftUnitalActionSig LeftMagmaAction Unital RightSemigroupAction LeftMonoid RightMonoid RightBiMagma LeftCancellativeOp LeftCancellative CommutativeSemigroup PointedCommutativeMagma RingoidSig SteinerMagma Band InducedRelation LeftIdempotence RightIdempotence LeftBinaryInverse RightBinaryInverse LeftShelf RightShelf UpDirectedSet TotalOrder DownDirectedSet Involution UnaryAntiDistribution PointComplement LogicAlgebraSig InverseSig RightMagmaActionSig LeftMagmaActionSig RightPointAction LeftPointAction LeftUnital RightUnital LeftBiMagma Semigroup CommutativeMagma MiddleCommute IdempotentMagma RackSig Sink PartialOrder UpperBound TotalPreorder LowerBound SimpleGraph InvolutiveMagmaSig ComplementedSig InvolutivePointedMagmaSig RightOperation LeftOperation Pair PointedMagma LeftDivisionMagma ImplicativeSig AdditiveMagma AntiAbsorbent MiddleAbsorption DirectoidIdentities RightShelfSig LeftShelfSig LeftDistributiveMagma RightDistributiveMagma SinkSig AntisymmetricOrderRelation Preorder EquivalenceRelation Graph Digraph StarSig Necessity ComplementSig PointedUnarySystem DoublyPointed MultiCarrier Pointed1Sig Pointed0Sig Magma TransitiveOrderRelation StrictPartialOrder ReflexiveOrderRelation SymmetricOrderRelation TotalRelation PseudoGraph UnaryOperation CarrierS PointedCarrier TransitiveRelation IrreflexiveRelation OrderRelation Pointed2Carrier UtoS SubType BinaryRelation Carrier Empty Base Carette, O'Connor Theory Presentation Combinators 5/18 Library fragment 1 NearSemiring := combine AdditiveSemigroup , Semigroup , RightRingoid over R i n g o i d S i g NearSemifield := combine NearSemiring , Group over Semigroup Semifield := combine NearSemifield , LeftRingoid over R i n g o i d S i g NearRing := combine AdditiveGroup , Semigroup , RightRingoid over R i n g o i d S i g Rng := combine AbelianAdditiveGroup , Semigroup , Ringoid over R i n g o i d S i g S e m i r i n g := combine AdditiveCommutativeMonoid , Monoid1, Ringoid , Left0 over Ringoid0Sig SemiRng := combine AdditiveCommutativeMonoid , Semigroup , Ringoid over R i n g o i d S i g D i o i d := combine Semiring , IdempotentAdditiveMagma over AdditiveMagma Ring := combine Rng, Semiring over SemiRng CommutativeRing := combine Ring , CommutativeMagma over Magma BooleanRing := combine CommutativeRing , IdempotentMagma over Magma NoZeroDivisors := Ringoid0Sig extended by f axiom onlyZeroDivisor ∗ 0 : f o r a l l x :U. ((exists b:U. x∗b = 0) and (exists b:U. b∗x = 0 ) ) i m p l i e s ( x = 0) g Domain := combine Ring, NoZeroDivisors over Ringoid0Sig IntegralDomain := combine CommutativeRing , NoZeroDivisors over Ringoid0Sig DivisionRing := Ring extended by f axiom d i v i s i b l e : f o r a l l x :U. not ( x=0) i m p l i e s ((exists! y:U. y∗x = 1) and (exists! y:U. x∗y = 1 ) ) g F i e l d := combine DivisionRing , IntegralDomain over Ring Carette, O'Connor Theory Presentation Combinators 6/18 Library fragment 2 MoufangLoop := combine Loop, MoufangIdentity over Magma LeftShelfSig := Magma[ ∗ j−> j> ] LeftShelf := LeftDistributiveMagma [ ∗ j−> j> ] RightShelfSig := Magma[ ∗ j−> <j ] RightShelf := RightDistributiveMagma[ ∗ j−> <j ] RackSig := combine LeftShelfSig , RightShelfSig over C a r r i e r S h e l f := combine LeftShelf , RightShelf over RackSig LeftBinaryInverse := RackSig extended by f axiom leftInverse j> <j : f o r a l l x , y :U. ( x j> y ) <j x = y g RightBinaryInverse := RackSig extended by f axiom rightInverse j> <j : f o r a l l x , y :U. x j> ( y <j x ) = y g Rack := combine RightShelf , LeftShelf , LeftBinaryInverse , RightBinaryInverse over RackSig LeftIdempotence := IdempotentMagma[ ∗ j−> j> ] RightIdempotence := IdempotentMagma[ ∗ j−> <j ] LeftSpindle := combine LeftShelf , LeftIdempotence over LeftShelfSig RightSpindle := combine RightShelf , RightIdempotence over RightShelfSig Quandle := combine

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    31 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us