src/HOL/Predicate_Compile_Examples/Predicate_Compile_Tests.thy
changeset 39657 5e57675b7e40
parent 39655 8ad7fe9d6f0b
child 39762 02fb709ab3cb
equal deleted inserted replaced
39656:f398f66969ce 39657:5e57675b7e40
  1325 end
  1325 end
  1326 
  1326 
  1327 text {* The global introduction rules must be redeclared as introduction rules and then 
  1327 text {* The global introduction rules must be redeclared as introduction rules and then 
  1328   one could invoke code_pred. *}
  1328   one could invoke code_pred. *}
  1329 
  1329 
  1330 declare A.hd_predicate_in_locale.intros [unfolded Predicate.eq_is_eq[symmetric], code_pred_intro]
  1330 declare A.hd_predicate_in_locale.intros [code_pred_intro]
  1331 
  1331 
  1332 code_pred (expected_modes: i => i => i => bool, i => i => o => bool) A.hd_predicate_in_locale
  1332 code_pred (expected_modes: i => i => i => bool, i => i => o => bool) A.hd_predicate_in_locale
  1333 unfolding eq_is_eq by (auto elim: A.hd_predicate_in_locale.cases)
  1333 by (auto elim: A.hd_predicate_in_locale.cases)
  1334     
  1334     
  1335 interpretation A partial_hd .
  1335 interpretation A partial_hd .
  1336 thm hd_predicate_in_locale.intros
  1336 thm hd_predicate_in_locale.intros
  1337 text {* A locally compliant solution with a trivial interpretation fails, because
  1337 text {* A locally compliant solution with a trivial interpretation fails, because
  1338 the predicate compiler has very strict assumptions about the terms and their structure. *}
  1338 the predicate compiler has very strict assumptions about the terms and their structure. *}