3.18
◼️

3.18

Date
Mar 18, 2024
Parent item
Sub-item
Tags
1.
Data.List中还有很多非常实用的函数,如subsequences, intersect, (\\), union 等
2.
复合函数(composite function)
haskell中提供符合函数运算符(.)来符合两个函数,η 化简后,h 可以直接写做 h = f.g,数学上写为 f ◦ g。
下面来看复合函数运算符的定义
(.) :: (b -> c) -> (a -> b) -> (a -> c) (.) f g = \x -> f (g x)
3.
高阶函数是函数式编程语言最重要的特征之一,由于函数可以当参数来传递,无论在解决问题时还是在开发库函数时候都将具有很高的灵活性。
fold函数在列表这种结构上具有极高的一般性
chapter 8 定义数据类型
同构 isomorphism
increasePrice :: ([Book],[Book]) -> Book -> Price -> ([Book], [Book]) increasePrice (b1, b2) b pri = (b : b1, (b {price = pri + (price b)} : b2))
从上面代码可以看到,Book这个类型在定义时有price这个访问器,所以我们可以在后面写一个大括号然后把值声明price = pri来设置price这个参数的值
零元数据构造器(nullary data constructor)
> :i Maybe data Maybe a = Nohing | Just a instance Eq a => Eq (Maybe a) instance Monad Maybe instance Ord a => Ord (Maybe a) instance Read a => Read (Maybe a) instance Show a => Show (Maybe a)
4.
peano arithmetic 皮亚诺算数
The Theory PA Peano Arithmetic)
The so-called Peano postulates for the natural numbers were introduced by Guseppo eano in 1889.
In modern form hey can be stated in the language of set theory as follows.
let N be a set containing an element 0, and let S n _>N be a function satisfying the following
It is not hard to show that any two systems (N, S, 0) and (N’, S’, 0’) WHICH BOTH SATISFY gp1, GP2 GP3 ARE ISOMOERPHIC, in the sense that thee is a bijection
we will introduce a standard set of axioms for he language
The theory generated by by these axioms is denoted PA and called Peano Arithmetic.
Since PA is a sound, axinomatizable theory it follows by the the to Tarski’s Teorem that it is incomplete.
Nevertheless, it appears to be strong enough to prove that all of the standard ersults in the fields of numbers theory (including such things as the prime number theorem whose standard proofs use nalysis). Even andresw wiles’s proof Fermat’s last Theorem has been claimed
we know that PA is sound and incomplete, so there are true sentences i nhte language which are not theorems of PA. which states that a specific true sentence, asserting that PA is consistent, is not a theorem of PA.
This theorem can be generalized to show that any consistent theory satisfying general conditions cannot prove its own consistency.
We will introduce a finitely aximatized subtheory RA
5.
Banach space 巴纳赫空间
🖤
完备赋范向量空间。更精确地说,巴拿赫空间是一个具有范数并对此范数完备向量空间。其完备性体现在,空间内任意向量的柯西序列总是收敛到一个良定义的位于空间内部的极限
enables the user code to be compact, resembling closely the mathematical formulation.
complex domain geometries without tyranny mesh generation.
6.
任意类型都与自己同构,即 A ≃ A。即 ≃ 是自反的(reflexive)
如果 A 与 B 同构,那么 B 与 A 也同构,即 A ≃ B =⇒ B ≃ A。即 ≃ 是对称 的(symmetric)。
如果 A ≃ B 并且 B ≃ C,那么 A ≃ C,即 A ≃ B ∧B ≃ C =⇒ A ≃ C。即 ≃ 是传递的(transitive)。
7.
基数(cardinal number)
  1. int2nat