Step 1 - Install and Configure dnscrypt-proxy
sudo su
pacman -S dnscrypt-proxy
cd /etc/dnscrypt-proxy/
| function auto_cd_xdotool --on-event fish_prompt | |
| if test $status -eq 0 | |
| if string match -q "mkdir*" $history[1] | |
| set -l splits (string split -n ' ' $history[1]) | |
| for i in $splits[-1..2] | |
| if not string match -q -- "-*" $i | |
| xdotool type --delay 100 "cd $i" | |
| return | |
| end | |
| end |
| ; https://terrytao.wordpress.com/2011/08/25/the-collatz-conjecture-littlewood-offord-theory-and-powers-of-2-and-3/ | |
| blank_symbol: # | |
| initial_state: bootstrap_stage_1 | |
| bootstrap_stage_1 | |
| # 1 R bootstrap_stage_2 | |
| 0 0 R unreachable | |
| 1 1 R unreachable |
| ; https://terrytao.wordpress.com/2011/08/25/the-collatz-conjecture-littlewood-offord-theory-and-powers-of-2-and-3/ | |
| blank_symbol: # | |
| initial_state: bootstrap_stage_1 | |
| bootstrap_stage_1 | |
| # 1 R cp_stage_5 | |
| 0 0 R unreachable | |
| 1 1 R unreachable |
| 000(023Rb|001Rb) | |
| 001(017La|002Rb) find 1 | |
| 002(021La|003Rb) find 2 | |
| 003(021La|004La) place c2 | |
| 004(009Rb|005Lb) | |
| 005(004Ra|005La) 向左找到 0, 1 -> 0 | |
| 006(008La|007La) | |
| 007(009Rb|007La) 向左找到 0, 重写成 0 | |
| 008(009Ra|008La) 向左找到 0, 重写成 0 | |
| 009(010Ra|026Ra) |
Step 1 - Install and Configure dnscrypt-proxy
sudo su
pacman -S dnscrypt-proxy
cd /etc/dnscrypt-proxy/
| Require Import | |
| Coq.FSets.FMapAVL | |
| Coq.FSets.FMapFacts | |
| Coq.Structures.OrderedTypeEx | |
| PeanoNat. | |
| Module Import M := FMapAVL.Make(Nat_as_OT). | |
| Print Module M. | |
| Check (M.t (list nat)). |
| Require Export Coq.Lists.List. | |
| Require Export Coq.Arith.Arith. | |
| Require Import Program.Wf. | |
| Program Fixpoint merge (x : list nat) (y : list nat) {measure (length x + length y)} : list nat := | |
| match x with | |
| | x1 :: xs => | |
| match y with | |
| | y1 :: ys => if x1 <=? y1 | |
| then x1::(merge xs y) |
| Require Export Coq.Lists.List. | |
| Require Export Coq.Arith.Arith. | |
| Require Import Program.Wf. | |
| Program Fixpoint merge (x : list nat) (y : list nat) {measure (length x + length y)} : list nat := | |
| match x with | |
| | x1 :: xs => | |
| match y with | |
| | y1 :: ys => if x1 <? y1 | |
| then x1::(merge xs y) |
| open import Data.String as String using (String; fromList) | |
| open import Data.Nat using (ℕ; zero; suc; _+_; _*_; _<′_; _≤′_) | |
| open import Data.Nat.Properties | |
| open import Data.Bool using (Bool; true; false; if_then_else_) | |
| open import Data.List hiding (merge; partition) | |
| open import Data.List.Properties using (map-id; map-compose) | |
| open import Data.Product using (Σ; Σ-syntax; _,_; proj₁; proj₂; _×_; map) | |
| open import Data.Sum as Sum using (_⊎_; inj₁; inj₂; map) | |
| open import Data.Unit using (⊤; tt) | |
| open import Data.Empty using (⊥; ⊥-elim) |
| (** * Merge: Merge Sort, With Specification and Proof of Correctness*) | |
| From VFA Require Import Perm. | |
| From VFA Require Import Sort. | |
| From Coq Require Import Recdef. (* needed for [Function] feature *) | |
| (** Mergesort is a well-known sorting algorithm, normally presented | |
| as an imperative algorithm on arrays, that has worst-case | |
| O(n log n) execution time and requires O(n) auxiliary space. |