src/Tools/isac/Knowledge/DiophantEq.thy
author wneuper <Walther.Neuper@jku.at>
Thu, 04 Aug 2022 12:48:37 +0200
changeset 60509 2e0b7ca391dc
parent 60449 2406d378cede
child 60586 007ef64dbb08
permissions -rw-r--r--
polish naming in Rewrite_Order
     1 (* Title:  Knowledge/DiophantEq.thy
     2    Author: Mathias Lehnfeld 2011
     3    (c) due to copyright terms
     4 12345678901234567890123456789012345678901234567890123456789012345678901234567890
     5         10        20        30        40        50        60        70        80
     6 *)
     7 
     8 theory DiophantEq imports Base_Tools Equation Test
     9 begin
    10 
    11 lemma int_isolate_add : "(bdv + a = b) = (bdv = b +  -1 * (a::int))"
    12   by auto
    13 
    14 text \<open>problemclass for the usecase\<close>
    15 
    16 problem pbl_equ_dio : "diophantine/equation" =
    17   \<open>Rule_Set.empty\<close>
    18   Method_Ref: "LinEq/solve_lineq_equation"
    19   CAS: "solve (e_e::bool, v_v::int)"
    20   Given: "boolTestGiven e_e" "intTestGiven (v_v::int)"
    21   (*                                TODO: drop ^^^^^*)
    22   Where:
    23   Find: "boolTestFind s_s"
    24 
    25 text \<open>method solving the usecase\<close>
    26 
    27 partial_function (tailrec) diophant_equation :: "bool => int => bool"
    28   where
    29 "diophant_equation e_e v_v = (
    30   Repeat (
    31     (Try (Rewrite_Inst [(''bdv'', v_v)] ''int_isolate_add'' )) #>
    32     (Try (Calculate ''PLUS'')) #>
    33     (Try (Calculate ''TIMES''))) e_e)"
    34 
    35 method met_test_diophant : "Test/solve_diophant" =
    36   \<open>{rew_ord' = "Rewrite_Ord.id_empty", rls' = tval_rls, srls = Rule_Set.empty, prls = Rule_Set.empty, calc = [],
    37     crls = tval_rls, errpats = [], nrls = Test_simplify}\<close>
    38   Program: diophant_equation.simps
    39   Given: "boolTestGiven e_e" "intTestGiven (v_v::int)"
    40 (*                                  TODO: drop ^^^^^*)
    41   Where:
    42   Find: "boolTestFind s_s"
    43 ML \<open>
    44 \<close> ML \<open>
    45 \<close>
    46 
    47 end