Datasets:
Tasks:
Text Generation
Modalities:
Text
Sub-tasks:
language-modeling
Languages:
English
Size:
100K - 1M
License:
Download formal/afp/Applicative_Lifting/Applicative_Environment_Algebra.thy from hoskinson-center/proof-pile: direct link, hf CLI and curl.
- Browser
- Download file 1.33 kB
-
https://huggingface.co/datasets/hoskinson-center/proof-pile/resolve/58f396bd7bc72f98b0ca49b8e109f761ceafe6bc/formal/afp/Applicative_Lifting/Applicative_Environment_Algebra.thy
- Command line
-
hf download hf://datasets/hoskinson-center/proof-pile@58f396bd7bc72f98b0ca49b8e109f761ceafe6bc/formal/afp/Applicative_Lifting/Applicative_Environment_Algebra.thy
-
curl -L -o Applicative_Environment_Algebra.thy https://huggingface.co/datasets/hoskinson-center/proof-pile/resolve/58f396bd7bc72f98b0ca49b8e109f761ceafe6bc/formal/afp/Applicative_Lifting/Applicative_Environment_Algebra.thy
1.33 kB
| (* Author: Andreas Lochbihler, ETH Zurich *) | |
| section \<open>Examples of applicative lifting\<close> | |
| subsection \<open>Algebraic operations for the environment functor\<close> | |
| theory Applicative_Environment_Algebra imports | |
| Applicative_Environment | |
| "HOL-Library.Function_Division" | |
| begin | |
| text \<open> Link between applicative instance of the environment functor with the pointwise operations | |
| for the algebraic type classes \<close> | |
| context includes applicative_syntax | |
| begin | |
| lemma plus_fun_af [applicative_unfold]: "f + g = pure (+) \<diamondop> f \<diamondop> g" | |
| unfolding plus_fun_def const_def apf_def .. | |
| lemma zero_fun_af [applicative_unfold]: "0 = pure 0" | |
| unfolding zero_fun_def const_def .. | |
| lemma times_fun_af [applicative_unfold]: "f * g = pure (*) \<diamondop> f \<diamondop> g" | |
| unfolding times_fun_def const_def apf_def .. | |
| lemma one_fun_af [applicative_unfold]: "1 = pure 1" | |
| unfolding one_fun_def const_def .. | |
| lemma of_nat_fun_af [applicative_unfold]: "of_nat n = pure (of_nat n)" | |
| unfolding of_nat_fun const_def .. | |
| lemma inverse_fun_af [applicative_unfold]: "inverse f = pure inverse \<diamondop> f" | |
| unfolding inverse_fun_def o_def const_def apf_def .. | |
| lemma divide_fun_af [applicative_unfold]: "divide f g = pure divide \<diamondop> f \<diamondop> g" | |
| unfolding divide_fun_def const_def apf_def .. | |
| end | |
| end | |