src/Doc/Tutorial/document/numerics.tex
changeset 57512 cc97b347b301
parent 48985 5386df44a037
child 57514 bdc2c6b40bf2
equal deleted inserted replaced
57511:de51a86fc903 57512:cc97b347b301
    18 used at all numeric types. Table~\ref{tab:overloading} in the appendix
    18 used at all numeric types. Table~\ref{tab:overloading} in the appendix
    19 shows the most important operations, together with the priorities of the
    19 shows the most important operations, together with the priorities of the
    20 infix symbols. Algebraic properties are organized using type classes
    20 infix symbols. Algebraic properties are organized using type classes
    21 around algebraic concepts such as rings and fields;
    21 around algebraic concepts such as rings and fields;
    22 a property such as the commutativity of addition is a single theorem 
    22 a property such as the commutativity of addition is a single theorem 
    23 (\isa{add_commute}) that applies to all numeric types.
    23 (\isa{add.commute}) that applies to all numeric types.
    24 
    24 
    25 \index{linear arithmetic}%
    25 \index{linear arithmetic}%
    26 Many theorems involving numeric types can be proved automatically by
    26 Many theorems involving numeric types can be proved automatically by
    27 Isabelle's arithmetic decision procedure, the method
    27 Isabelle's arithmetic decision procedure, the method
    28 \methdx{arith}.  Linear arithmetic comprises addition, subtraction
    28 \methdx{arith}.  Linear arithmetic comprises addition, subtraction
   439 associativity and commutativity of addition.  Simplifying with the
   439 associativity and commutativity of addition.  Simplifying with the
   440 following equations sorts the terms and groups them to the right, making
   440 following equations sorts the terms and groups them to the right, making
   441 the two expressions identical.
   441 the two expressions identical.
   442 \begin{isabelle}
   442 \begin{isabelle}
   443 a\ +\ b\ +\ c\ =\ a\ +\ (b\ +\ c)
   443 a\ +\ b\ +\ c\ =\ a\ +\ (b\ +\ c)
   444 \rulenamedx{add_assoc}\isanewline
   444 \rulenamedx{add.assoc}\isanewline
   445 a\ +\ b\ =\ b\ +\ a%
   445 a\ +\ b\ =\ b\ +\ a%
   446 \rulenamedx{add_commute}\isanewline
   446 \rulenamedx{add.commute}\isanewline
   447 a\ +\ (b\ +\ c)\ =\ b\ +\ (a\ +\ c)
   447 a\ +\ (b\ +\ c)\ =\ b\ +\ (a\ +\ c)
   448 \rulename{add_left_commute}
   448 \rulename{add.left_commute}
   449 \end{isabelle}
   449 \end{isabelle}
   450 The name \isa{add_ac}\index{*add_ac (theorems)} 
   450 The name \isa{add_ac}\index{*add_ac (theorems)} 
   451 refers to the list of all three theorems; similarly
   451 refers to the list of all three theorems; similarly
   452 there is \isa{mult_ac}.\index{*mult_ac (theorems)} 
   452 there is \isa{mult_ac}.\index{*mult_ac (theorems)} 
   453 They are all proved for semirings and therefore hold for all numeric types.
   453 They are all proved for semirings and therefore hold for all numeric types.