1 theory Test_Z_Transform imports Isac begin
3 text {*examples copied from NEWS, HOL, Nat*}
5 eq (infix "===" 50) where
6 eq_refl: "x === x" and eq_subst: "x === y ==> P x ==> P y"
10 Suc_Rep :: "ind => ind"
12 -- {* the axiom of infinity in 2 parts *}
13 Suc_Rep_inject: "Suc_Rep x = Suc_Rep y ==> x = y" and
14 Suc_Rep_not_Zero_Rep: "Suc_Rep x \<noteq> Zero_Rep"
16 definition "f x y = x + y + 1"
17 definition g where "g x = f x x"
19 term2str @{term "f 2 3"}
22 section {*trials towards Z transform *}
25 @{term "1 < || z ||"};
26 @{term "z / (z - 1)"};
28 @{term "-u [-n - 1]"}; (*[ ] denotes lists !!!*)
29 @{term "z /(z - 1) = -u [-n - 1]"};
30 @{term "1 < || z || ==> z / (z - 1) = -u [-n - 1]"};
31 term2str @{term "1 < || z || ==> z / (z - 1) = -u [-n - 1]"};
38 term2str @{term "\<rho> "};
42 (*axiomatization "z / (z - 1) = -u [-n - 1]" Illegal variable name: "z / (z - 1) = -u [-n - 1]" *)
43 (*definition "z / (z - 1) = -u [-n - 1]" Bad head of lhs: existing constant "op /"*)
45 rule1: "\<forall>x. \<delta>[n] = 1"
46 rule3: "1 < || z || ==> z / (z - 1) = -u [-n - 1]"
47 (*rule4: "|| \<alpha> || < || z || ==> z / (z - \<alpha>) = \<alpha>^n * [n]"
48 Type unification failed: Clash of types "_ list" and "real"*)
49 rule4: "|| \<alpha> || < || z || ==> z / (z - \<alpha>) = \<alpha> * u [n]"
56 subsection {*apply rules*}
58 val (thy, ro, er) = (@{theory}, tless_true, eval_rls);
61 val t = @{term "z / (z - 1) = -u [-n - 1]"};
64 print_depth 999; Pattern.match thy; print_depth 999
69 rewrite_ thy ro er true @{thm rule3} t