1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/doc-src/isac/jrocnik/Test_Complex.thy Fri Jul 22 10:21:49 2011 +0200
1.3 @@ -0,0 +1,34 @@
1.4 +(* theory Test_Complex imports Isac begin
1.5 +ERROR TODO ^^^^:
1.6 +ML {*
1.7 +@{term "Complex 1 2 ^ Complex 3 4"};
1.8 +*}
1.9 +Type unification failed: Clash of types "complex" and "nat"
1.10 +Operator: op ^ (Complex 1 2) :: nat \<Rightarrow> complex
1.11 +Operand: Complex 3 4 :: complex
1.12 +*)
1.13 +
1.14 +theory Test_Complex imports Main begin
1.15 +
1.16 +ML {*
1.17 +@{term "Complex 1 2"};
1.18 +@{term "Complex 1 2 + Complex 3 4"};
1.19 +@{term "Complex 1 2 * Complex 3 4"};
1.20 +@{term "Complex 1 2 - Complex 3 4"};
1.21 +@{term "Complex 1 2 / Complex 3 4"};
1.22 +@{term "Complex 1 2 ^ Complex 3 4"};
1.23 +*}
1.24 +ML {*
1.25 +val a = @{term "Complex 1 2"};
1.26 +val b = @{term "Complex 3 4"};
1.27 +(*a + (b::complex); ERROR: term + term*)
1.28 +*}
1.29 +ML {*
1.30 +@{term "let a = Complex 1 2; b = Complex 3 4 in a + b"};
1.31 +*}
1.32 +ML {*
1.33 +(*TODO rules for simplification*)
1.34 +*}
1.35 +
1.36 +end
1.37 +