src/Pure/Pure.thy
author wenzelm
Fri, 17 Aug 2012 11:23:57 +0200
changeset 48835 574042d14fd9
parent 48646 91281e9472d8
child 48891 c0eafbd55de3
permissions -rw-r--r--
tuned;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
48638
22d65e375c01 more standard bootstrapping of Pure.thy;
wenzelm
parents: 29606
diff changeset
     1
theory Pure
48641
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
     2
  keywords
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
     3
    "!!" "!" "%" "(" ")" "+" "," "--" ":" "::" ";" "<" "<=" "=" "=="
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
     4
    "=>" "?" "[" "\<equiv>" "\<leftharpoondown>" "\<rightharpoonup>"
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
     5
    "\<rightleftharpoons>" "\<subseteq>" "]" "advanced" "and" "assumes"
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
     6
    "attach" "begin" "binder" "constrains" "defines" "fixes" "for"
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
     7
    "identifier" "if" "imports" "in" "includes" "infix" "infixl"
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
     8
    "infixr" "is" "keywords" "notes" "obtains" "open" "output"
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
     9
    "overloaded" "pervasive" "shows" "structure" "unchecked" "uses"
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
    10
    "where" "|"
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
    11
  and "header" :: diag
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
    12
  and "chapter" :: thy_heading1
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
    13
  and "section" :: thy_heading2
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
    14
  and "subsection" :: thy_heading3
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
    15
  and "subsubsection" :: thy_heading4
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
    16
  and "text" "text_raw" :: thy_decl
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
    17
  and "sect" :: prf_heading2 % "proof"
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
    18
  and "subsect" :: prf_heading3 % "proof"
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
    19
  and "subsubsect" :: prf_heading4 % "proof"
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
    20
  and "txt" "txt_raw" :: prf_decl % "proof"
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
    21
  and "classes" "classrel" "default_sort" "typedecl" "type_synonym"
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
    22
    "nonterminal" "arities" "judgment" "consts" "syntax" "no_syntax"
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
    23
    "translations" "no_translations" "axioms" "defs" "definition"
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
    24
    "abbreviation" "type_notation" "no_type_notation" "notation"
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
    25
    "no_notation" "axiomatization" "theorems" "lemmas" "declare"
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
    26
    "hide_class" "hide_type" "hide_const" "hide_fact" :: thy_decl
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
    27
  and "use" "ML" :: thy_decl % "ML"
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
    28
  and "ML_prf" :: prf_decl % "proof"  (* FIXME % "ML" ?? *)
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
    29
  and "ML_val" "ML_command" :: diag % "ML"
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
    30
  and "setup" "local_setup" "attribute_setup" "method_setup"
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
    31
    "declaration" "syntax_declaration" "simproc_setup"
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
    32
    "parse_ast_translation" "parse_translation" "print_translation"
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
    33
    "typed_print_translation" "print_ast_translation" "oracle" :: thy_decl % "ML"
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
    34
  and "bundle" :: thy_decl
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
    35
  and "include" "including" :: prf_decl
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
    36
  and "print_bundles" :: diag
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
    37
  and "context" "locale" :: thy_decl
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
    38
  and "sublocale" "interpretation" :: thy_schematic_goal
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
    39
  and "interpret" :: prf_goal % "proof"  (* FIXME schematic? *)
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
    40
  and "class" :: thy_decl
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
    41
  and "subclass" :: thy_goal
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
    42
  and "instantiation" :: thy_decl
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
    43
  and "instance" :: thy_goal
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
    44
  and "overloading" :: thy_decl
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
    45
  and "code_datatype" :: thy_decl
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
    46
  and "theorem" "lemma" "corollary" :: thy_goal
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
    47
  and "schematic_theorem" "schematic_lemma" "schematic_corollary" :: thy_schematic_goal
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
    48
  and "notepad" :: thy_decl
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
    49
  and "have" "hence" :: prf_goal % "proof"
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
    50
  and "show" "thus" :: prf_asm_goal % "proof"
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
    51
  and "then" "from" "with" :: prf_chain % "proof"
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
    52
  and "note" "using" "unfolding" :: prf_decl % "proof"
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
    53
  and "fix" "assume" "presume" "def" :: prf_asm % "proof"
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
    54
  and "obtain" "guess" :: prf_asm_goal % "proof"
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
    55
  and "let" "write" :: prf_decl % "proof"
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
    56
  and "case" :: prf_asm % "proof"
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
    57
  and "{" :: prf_open % "proof"
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
    58
  and "}" :: prf_close % "proof"
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
    59
  and "next" :: prf_block % "proof"
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
    60
  and "qed" :: qed_block % "proof"
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
    61
  and "by" ".." "." "done" "sorry" :: "qed" % "proof"
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
    62
  and "oops" :: qed_global % "proof"
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
    63
  and "defer" "prefer" "apply" "apply_end" :: prf_script % "proof"
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
    64
  and "proof" :: prf_block % "proof"
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
    65
  and "also" "moreover" :: prf_decl % "proof"
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
    66
  and "finally" "ultimately" :: prf_chain % "proof"
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
    67
  and "back" :: prf_script % "proof"
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
    68
  and "Isabelle.command" :: control
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
    69
  and "pretty_setmargin" "help" "print_commands" "print_configs"
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
    70
    "print_context" "print_theory" "print_syntax" "print_abbrevs"
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
    71
    "print_theorems" "print_locales" "print_classes" "print_locale"
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
    72
    "print_interps" "print_dependencies" "print_attributes"
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
    73
    "print_simpset" "print_rules" "print_trans_rules" "print_methods"
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
    74
    "print_antiquotations" "thy_deps" "class_deps" "thm_deps"
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
    75
    "print_binds" "print_facts" "print_cases" "print_statement" "thm"
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
    76
    "prf" "full_prf" "prop" "term" "typ" "print_codesetup" "unused_thms"
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
    77
    :: diag
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
    78
  and "cd" :: control
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
    79
  and "pwd" :: diag
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
    80
  and "use_thy" "remove_thy" "kill_thy" :: control
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
    81
  and "display_drafts" "print_drafts" "pr" :: diag
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
    82
  and "disable_pr" "enable_pr" "commit" "quit" "exit" :: control
48646
91281e9472d8 more official command specifications, including source position;
wenzelm
parents: 48641
diff changeset
    83
  and "welcome" :: diag
91281e9472d8 more official command specifications, including source position;
wenzelm
parents: 48641
diff changeset
    84
  and "init_toplevel" "linear_undo" "undo" "undos_proof" "cannot_undo" "kill" :: control
48641
92b48b8abfe4 more standard bootstrapping of Pure outer syntax;
wenzelm
parents: 48638
diff changeset
    85
  and "end" :: thy_end % "theory"
48646
91281e9472d8 more official command specifications, including source position;
wenzelm
parents: 48641
diff changeset
    86
  and "realizers" "realizability" "extract_type" "extract" :: thy_decl
91281e9472d8 more official command specifications, including source position;
wenzelm
parents: 48641
diff changeset
    87
  and "find_theorems" "find_consts" :: diag
91281e9472d8 more official command specifications, including source position;
wenzelm
parents: 48641
diff changeset
    88
  uses
91281e9472d8 more official command specifications, including source position;
wenzelm
parents: 48641
diff changeset
    89
    "Isar/isar_syn.ML"
91281e9472d8 more official command specifications, including source position;
wenzelm
parents: 48641
diff changeset
    90
    "Tools/find_theorems.ML"
91281e9472d8 more official command specifications, including source position;
wenzelm
parents: 48641
diff changeset
    91
    "Tools/find_consts.ML"
48638
22d65e375c01 more standard bootstrapping of Pure.thy;
wenzelm
parents: 29606
diff changeset
    92
begin
15803
42c75e0c9140 The Pure theory.
wenzelm
parents:
diff changeset
    93
26435
bdce320cd426 eliminated delayed theory setup
wenzelm
parents: 26426
diff changeset
    94
section {* Further content for the Pure theory *}
20627
30da2841553e revert to previous version;
wenzelm
parents: 20596
diff changeset
    95
18466
389a6f9c31f4 added locale meta_conjunction_syntax and various conjunction rules;
wenzelm
parents: 18019
diff changeset
    96
subsection {* Meta-level connectives in assumptions *}
15803
42c75e0c9140 The Pure theory.
wenzelm
parents:
diff changeset
    97
42c75e0c9140 The Pure theory.
wenzelm
parents:
diff changeset
    98
lemma meta_mp:
18019
wenzelm
parents: 15824
diff changeset
    99
  assumes "PROP P ==> PROP Q" and "PROP P"
15803
42c75e0c9140 The Pure theory.
wenzelm
parents:
diff changeset
   100
  shows "PROP Q"
18019
wenzelm
parents: 15824
diff changeset
   101
    by (rule `PROP P ==> PROP Q` [OF `PROP P`])
15803
42c75e0c9140 The Pure theory.
wenzelm
parents:
diff changeset
   102
23432
cec811764a38 added meta_impE
nipkow
parents: 22933
diff changeset
   103
lemmas meta_impE = meta_mp [elim_format]
cec811764a38 added meta_impE
nipkow
parents: 22933
diff changeset
   104
15803
42c75e0c9140 The Pure theory.
wenzelm
parents:
diff changeset
   105
lemma meta_spec:
26958
ed3a58a9eae1 converted to regular application syntax;
wenzelm
parents: 26572
diff changeset
   106
  assumes "!!x. PROP P x"
ed3a58a9eae1 converted to regular application syntax;
wenzelm
parents: 26572
diff changeset
   107
  shows "PROP P x"
ed3a58a9eae1 converted to regular application syntax;
wenzelm
parents: 26572
diff changeset
   108
    by (rule `!!x. PROP P x`)
15803
42c75e0c9140 The Pure theory.
wenzelm
parents:
diff changeset
   109
42c75e0c9140 The Pure theory.
wenzelm
parents:
diff changeset
   110
lemmas meta_allE = meta_spec [elim_format]
42c75e0c9140 The Pure theory.
wenzelm
parents:
diff changeset
   111
26570
dbc458262f4c added swap_params;
wenzelm
parents: 26435
diff changeset
   112
lemma swap_params:
26958
ed3a58a9eae1 converted to regular application syntax;
wenzelm
parents: 26572
diff changeset
   113
  "(!!x y. PROP P x y) == (!!y x. PROP P x y)" ..
26570
dbc458262f4c added swap_params;
wenzelm
parents: 26435
diff changeset
   114
18466
389a6f9c31f4 added locale meta_conjunction_syntax and various conjunction rules;
wenzelm
parents: 18019
diff changeset
   115
389a6f9c31f4 added locale meta_conjunction_syntax and various conjunction rules;
wenzelm
parents: 18019
diff changeset
   116
subsection {* Meta-level conjunction *}
389a6f9c31f4 added locale meta_conjunction_syntax and various conjunction rules;
wenzelm
parents: 18019
diff changeset
   117
389a6f9c31f4 added locale meta_conjunction_syntax and various conjunction rules;
wenzelm
parents: 18019
diff changeset
   118
lemma all_conjunction:
28856
5e009a80fe6d Pure syntax: more coherent treatment of aprop, permanent TERM and &&&;
wenzelm
parents: 28699
diff changeset
   119
  "(!!x. PROP A x &&& PROP B x) == ((!!x. PROP A x) &&& (!!x. PROP B x))"
18466
389a6f9c31f4 added locale meta_conjunction_syntax and various conjunction rules;
wenzelm
parents: 18019
diff changeset
   120
proof
28856
5e009a80fe6d Pure syntax: more coherent treatment of aprop, permanent TERM and &&&;
wenzelm
parents: 28699
diff changeset
   121
  assume conj: "!!x. PROP A x &&& PROP B x"
5e009a80fe6d Pure syntax: more coherent treatment of aprop, permanent TERM and &&&;
wenzelm
parents: 28699
diff changeset
   122
  show "(!!x. PROP A x) &&& (!!x. PROP B x)"
19121
d7fd5415a781 simplified Pure conjunction;
wenzelm
parents: 19048
diff changeset
   123
  proof -
18466
389a6f9c31f4 added locale meta_conjunction_syntax and various conjunction rules;
wenzelm
parents: 18019
diff changeset
   124
    fix x
26958
ed3a58a9eae1 converted to regular application syntax;
wenzelm
parents: 26572
diff changeset
   125
    from conj show "PROP A x" by (rule conjunctionD1)
ed3a58a9eae1 converted to regular application syntax;
wenzelm
parents: 26572
diff changeset
   126
    from conj show "PROP B x" by (rule conjunctionD2)
18466
389a6f9c31f4 added locale meta_conjunction_syntax and various conjunction rules;
wenzelm
parents: 18019
diff changeset
   127
  qed
389a6f9c31f4 added locale meta_conjunction_syntax and various conjunction rules;
wenzelm
parents: 18019
diff changeset
   128
next
28856
5e009a80fe6d Pure syntax: more coherent treatment of aprop, permanent TERM and &&&;
wenzelm
parents: 28699
diff changeset
   129
  assume conj: "(!!x. PROP A x) &&& (!!x. PROP B x)"
18466
389a6f9c31f4 added locale meta_conjunction_syntax and various conjunction rules;
wenzelm
parents: 18019
diff changeset
   130
  fix x
28856
5e009a80fe6d Pure syntax: more coherent treatment of aprop, permanent TERM and &&&;
wenzelm
parents: 28699
diff changeset
   131
  show "PROP A x &&& PROP B x"
19121
d7fd5415a781 simplified Pure conjunction;
wenzelm
parents: 19048
diff changeset
   132
  proof -
26958
ed3a58a9eae1 converted to regular application syntax;
wenzelm
parents: 26572
diff changeset
   133
    show "PROP A x" by (rule conj [THEN conjunctionD1, rule_format])
ed3a58a9eae1 converted to regular application syntax;
wenzelm
parents: 26572
diff changeset
   134
    show "PROP B x" by (rule conj [THEN conjunctionD2, rule_format])
18466
389a6f9c31f4 added locale meta_conjunction_syntax and various conjunction rules;
wenzelm
parents: 18019
diff changeset
   135
  qed
389a6f9c31f4 added locale meta_conjunction_syntax and various conjunction rules;
wenzelm
parents: 18019
diff changeset
   136
qed
389a6f9c31f4 added locale meta_conjunction_syntax and various conjunction rules;
wenzelm
parents: 18019
diff changeset
   137
19121
d7fd5415a781 simplified Pure conjunction;
wenzelm
parents: 19048
diff changeset
   138
lemma imp_conjunction:
28856
5e009a80fe6d Pure syntax: more coherent treatment of aprop, permanent TERM and &&&;
wenzelm
parents: 28699
diff changeset
   139
  "(PROP A ==> PROP B &&& PROP C) == (PROP A ==> PROP B) &&& (PROP A ==> PROP C)"
18836
3a1e4ee72075 tuned proofs;
wenzelm
parents: 18710
diff changeset
   140
proof
28856
5e009a80fe6d Pure syntax: more coherent treatment of aprop, permanent TERM and &&&;
wenzelm
parents: 28699
diff changeset
   141
  assume conj: "PROP A ==> PROP B &&& PROP C"
5e009a80fe6d Pure syntax: more coherent treatment of aprop, permanent TERM and &&&;
wenzelm
parents: 28699
diff changeset
   142
  show "(PROP A ==> PROP B) &&& (PROP A ==> PROP C)"
19121
d7fd5415a781 simplified Pure conjunction;
wenzelm
parents: 19048
diff changeset
   143
  proof -
18466
389a6f9c31f4 added locale meta_conjunction_syntax and various conjunction rules;
wenzelm
parents: 18019
diff changeset
   144
    assume "PROP A"
19121
d7fd5415a781 simplified Pure conjunction;
wenzelm
parents: 19048
diff changeset
   145
    from conj [OF `PROP A`] show "PROP B" by (rule conjunctionD1)
d7fd5415a781 simplified Pure conjunction;
wenzelm
parents: 19048
diff changeset
   146
    from conj [OF `PROP A`] show "PROP C" by (rule conjunctionD2)
18466
389a6f9c31f4 added locale meta_conjunction_syntax and various conjunction rules;
wenzelm
parents: 18019
diff changeset
   147
  qed
389a6f9c31f4 added locale meta_conjunction_syntax and various conjunction rules;
wenzelm
parents: 18019
diff changeset
   148
next
28856
5e009a80fe6d Pure syntax: more coherent treatment of aprop, permanent TERM and &&&;
wenzelm
parents: 28699
diff changeset
   149
  assume conj: "(PROP A ==> PROP B) &&& (PROP A ==> PROP C)"
18466
389a6f9c31f4 added locale meta_conjunction_syntax and various conjunction rules;
wenzelm
parents: 18019
diff changeset
   150
  assume "PROP A"
28856
5e009a80fe6d Pure syntax: more coherent treatment of aprop, permanent TERM and &&&;
wenzelm
parents: 28699
diff changeset
   151
  show "PROP B &&& PROP C"
19121
d7fd5415a781 simplified Pure conjunction;
wenzelm
parents: 19048
diff changeset
   152
  proof -
d7fd5415a781 simplified Pure conjunction;
wenzelm
parents: 19048
diff changeset
   153
    from `PROP A` show "PROP B" by (rule conj [THEN conjunctionD1])
d7fd5415a781 simplified Pure conjunction;
wenzelm
parents: 19048
diff changeset
   154
    from `PROP A` show "PROP C" by (rule conj [THEN conjunctionD2])
18466
389a6f9c31f4 added locale meta_conjunction_syntax and various conjunction rules;
wenzelm
parents: 18019
diff changeset
   155
  qed
389a6f9c31f4 added locale meta_conjunction_syntax and various conjunction rules;
wenzelm
parents: 18019
diff changeset
   156
qed
389a6f9c31f4 added locale meta_conjunction_syntax and various conjunction rules;
wenzelm
parents: 18019
diff changeset
   157
389a6f9c31f4 added locale meta_conjunction_syntax and various conjunction rules;
wenzelm
parents: 18019
diff changeset
   158
lemma conjunction_imp:
28856
5e009a80fe6d Pure syntax: more coherent treatment of aprop, permanent TERM and &&&;
wenzelm
parents: 28699
diff changeset
   159
  "(PROP A &&& PROP B ==> PROP C) == (PROP A ==> PROP B ==> PROP C)"
18466
389a6f9c31f4 added locale meta_conjunction_syntax and various conjunction rules;
wenzelm
parents: 18019
diff changeset
   160
proof
28856
5e009a80fe6d Pure syntax: more coherent treatment of aprop, permanent TERM and &&&;
wenzelm
parents: 28699
diff changeset
   161
  assume r: "PROP A &&& PROP B ==> PROP C"
22933
338c7890c96f tuned proofs;
wenzelm
parents: 21627
diff changeset
   162
  assume ab: "PROP A" "PROP B"
338c7890c96f tuned proofs;
wenzelm
parents: 21627
diff changeset
   163
  show "PROP C"
338c7890c96f tuned proofs;
wenzelm
parents: 21627
diff changeset
   164
  proof (rule r)
28856
5e009a80fe6d Pure syntax: more coherent treatment of aprop, permanent TERM and &&&;
wenzelm
parents: 28699
diff changeset
   165
    from ab show "PROP A &&& PROP B" .
22933
338c7890c96f tuned proofs;
wenzelm
parents: 21627
diff changeset
   166
  qed
18466
389a6f9c31f4 added locale meta_conjunction_syntax and various conjunction rules;
wenzelm
parents: 18019
diff changeset
   167
next
389a6f9c31f4 added locale meta_conjunction_syntax and various conjunction rules;
wenzelm
parents: 18019
diff changeset
   168
  assume r: "PROP A ==> PROP B ==> PROP C"
28856
5e009a80fe6d Pure syntax: more coherent treatment of aprop, permanent TERM and &&&;
wenzelm
parents: 28699
diff changeset
   169
  assume conj: "PROP A &&& PROP B"
18466
389a6f9c31f4 added locale meta_conjunction_syntax and various conjunction rules;
wenzelm
parents: 18019
diff changeset
   170
  show "PROP C"
389a6f9c31f4 added locale meta_conjunction_syntax and various conjunction rules;
wenzelm
parents: 18019
diff changeset
   171
  proof (rule r)
19121
d7fd5415a781 simplified Pure conjunction;
wenzelm
parents: 19048
diff changeset
   172
    from conj show "PROP A" by (rule conjunctionD1)
d7fd5415a781 simplified Pure conjunction;
wenzelm
parents: 19048
diff changeset
   173
    from conj show "PROP B" by (rule conjunctionD2)
18466
389a6f9c31f4 added locale meta_conjunction_syntax and various conjunction rules;
wenzelm
parents: 18019
diff changeset
   174
  qed
389a6f9c31f4 added locale meta_conjunction_syntax and various conjunction rules;
wenzelm
parents: 18019
diff changeset
   175
qed
389a6f9c31f4 added locale meta_conjunction_syntax and various conjunction rules;
wenzelm
parents: 18019
diff changeset
   176
48638
22d65e375c01 more standard bootstrapping of Pure.thy;
wenzelm
parents: 29606
diff changeset
   177
end
22d65e375c01 more standard bootstrapping of Pure.thy;
wenzelm
parents: 29606
diff changeset
   178