equal
deleted
inserted
replaced
|
1 (* theory Test_Complex imports Isac begin |
|
2 ERROR TODO ^^^^: |
|
3 ML {* |
|
4 @{term "Complex 1 2 ^ Complex 3 4"}; |
|
5 *} |
|
6 Type unification failed: Clash of types "complex" and "nat" |
|
7 Operator: op ^ (Complex 1 2) :: nat \<Rightarrow> complex |
|
8 Operand: Complex 3 4 :: complex |
|
9 *) |
|
10 |
|
11 theory Test_Complex imports Main begin |
|
12 |
|
13 ML {* |
|
14 @{term "Complex 1 2"}; |
|
15 @{term "Complex 1 2 + Complex 3 4"}; |
|
16 @{term "Complex 1 2 * Complex 3 4"}; |
|
17 @{term "Complex 1 2 - Complex 3 4"}; |
|
18 @{term "Complex 1 2 / Complex 3 4"}; |
|
19 @{term "Complex 1 2 ^ Complex 3 4"}; |
|
20 *} |
|
21 ML {* |
|
22 val a = @{term "Complex 1 2"}; |
|
23 val b = @{term "Complex 3 4"}; |
|
24 (*a + (b::complex); ERROR: term + term*) |
|
25 *} |
|
26 ML {* |
|
27 @{term "let a = Complex 1 2; b = Complex 3 4 in a + b"}; |
|
28 *} |
|
29 ML {* |
|
30 (*TODO rules for simplification*) |
|
31 *} |
|
32 |
|
33 end |
|
34 |