src/FOL/ex/Locale_Test/Locale_Test1.thy
changeset 41779 a68f503805ed
parent 41435 12585dfb86fe
child 43543 eb8b4851b039
equal deleted inserted replaced
41778:5f79a9e42507 41779:a68f503805ed
    11 typedecl int arities int :: "term"
    11 typedecl int arities int :: "term"
    12 consts plus :: "int => int => int" (infixl "+" 60)
    12 consts plus :: "int => int => int" (infixl "+" 60)
    13   zero :: int ("0")
    13   zero :: int ("0")
    14   minus :: "int => int" ("- _")
    14   minus :: "int => int" ("- _")
    15 
    15 
    16 axioms
    16 axiomatization where
    17   int_assoc: "(x + y::int) + z = x + (y + z)"
    17   int_assoc: "(x + y::int) + z = x + (y + z)" and
    18   int_zero: "0 + x = x"
    18   int_zero: "0 + x = x" and
    19   int_minus: "(-x) + x = 0"
    19   int_minus: "(-x) + x = 0" and
    20   int_minus2: "-(-x) = x"
    20   int_minus2: "-(-x) = x"
    21 
    21 
    22 section {* Inference of parameter types *}
    22 section {* Inference of parameter types *}
    23 
    23 
    24 locale param1 = fixes p
    24 locale param1 = fixes p
   525 
   525 
   526 definition less (infix "\<sqsubset>" 50) where "x \<sqsubset> y <-> x \<sqsubseteq> y & x ~= y"
   526 definition less (infix "\<sqsubset>" 50) where "x \<sqsubset> y <-> x \<sqsubseteq> y & x ~= y"
   527 
   527 
   528 end
   528 end
   529 
   529 
   530 consts
   530 axiomatization
   531   gle :: "'a => 'a => o" gless :: "'a => 'a => o"
   531   gle :: "'a => 'a => o" and gless :: "'a => 'a => o" and
   532   gle' :: "'a => 'a => o" gless' :: "'a => 'a => o"
   532   gle' :: "'a => 'a => o" and gless' :: "'a => 'a => o"
   533 
   533 where
   534 axioms
   534   grefl: "gle(x, x)" and gless_def: "gless(x, y) <-> gle(x, y) & x ~= y" and
   535   grefl: "gle(x, x)" gless_def: "gless(x, y) <-> gle(x, y) & x ~= y"
   535   grefl': "gle'(x, x)" and gless'_def: "gless'(x, y) <-> gle'(x, y) & x ~= y"
   536   grefl': "gle'(x, x)" gless'_def: "gless'(x, y) <-> gle'(x, y) & x ~= y"
       
   537 
   536 
   538 text {* Setup *}
   537 text {* Setup *}
   539 
   538 
   540 locale mixin = reflexive
   539 locale mixin = reflexive
   541 begin
   540 begin