add rss feed
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Michael Zhang 2023-03-26 14:32:38 -05:00
parent 970a8b6e9f
commit e31a8ba367
5 changed files with 87 additions and 5 deletions

View file

@ -1,5 +1,7 @@
@import "footer"; @import "footer";
$breakpoint: 720px;
html { html {
min-height: 100vh; min-height: 100vh;
margin: 0; margin: 0;
@ -68,7 +70,8 @@ footer {
.side-nav .side-nav-content { .side-nav .side-nav-content {
display: flex; display: flex;
justify-content: space-evenly; justify-content: center;
gap: 20px;
.me { .me {
display: flex; display: flex;
@ -91,7 +94,7 @@ footer {
} }
} }
@media screen and (max-width: 672px) { @media screen and (max-width: $breakpoint) {
.flex-wrapper { .flex-wrapper {
flex-direction: column; flex-direction: column;
.container { .container {
@ -116,6 +119,7 @@ footer {
.portrait { .portrait {
max-height: 80px; max-height: 80px;
} }
.bio { .bio {
display: none; display: none;
} }
@ -123,7 +127,7 @@ footer {
} }
} }
@media screen and (min-width: 672px) { @media screen and (min-width: $breakpoint) {
.flex-wrapper { .flex-wrapper {
flex-direction: row; flex-direction: row;
.container { .container {
@ -137,7 +141,8 @@ footer {
left: 0; left: 0;
top: 0; top: 0;
// Capital Min to avoid invoking SCSS min // Capital Min to avoid invoking SCSS min
max-width: Min(30%, 30em); width: 30%;
min-width: 300px;
.side-nav-content { .side-nav-content {
padding-top: 32px; padding-top: 32px;

View file

@ -1,3 +1,3 @@
name: blog name: blog
depend: standard-library depend: standard-library cubical
include: content/posts include: content/posts

View file

@ -0,0 +1,75 @@
+++
title = "Proving true from false"
slug = "proving-true-from-false"
date = 2023-02-04
tags = ["type-theory"]
math = true
draft = true
+++
<details>
<summary>Imports</summary>
These are some imports that are required for code on this page to work properly.
```agda
{-# OPTIONS --cubical #-}
open import Cubical.Foundations.Prelude
open import Data.Bool
open import Data.Unit
open import Data.Empty
¬_ : Set → Set
¬ A = A → ⊥
_≢_ : ∀ {A : Set} → A → A → Set
x ≢ y = ¬ (x ≡ y)
```
</details>
Let's say you wanted to prove that `true` and `false` diverge, a.k.a are not
equal to each other. In a theorem prover like Agda, you could write this
statement as something like this:
```
true≢false : true ≢ false
```
For many "obvious" statements, it suffices to just write `refl` since the two
sides are trivially true via rewriting. For example:
```
open import Data.Nat
1+2≡3 : 1 + 2 ≡ 3
1+2≡3 = refl
```
However, in cubical Agda, this following statement doesn't work. I've commented
it out so the code on this page can continue to compile.
```
-- true≢false = refl
```
It looks like it's not obvious to the interpreter that this statement is
actually true. Why is this?
Well, in homotopy type theory, TODO
The strategy here is we define some kind of "type-map". Every time we see true,
we'll map it to some type, and every time we see false, we'll map it to empty.
Because the `≢` type actually means "having `a ≡ b` can produce `⊥`", all we
need to do is to produce an empty type. To do this, we need to do something
called _transport_.
In homotopy type theory, is a way of generating functions out of paths.
```
bool-map : Bool → Type
bool-map true =
bool-map false = ⊥
true≢false p = transport (λ i → bool-map (p i)) tt
```

View file

@ -10,6 +10,7 @@
{{ if .IsHome }} {{ if .IsHome }}
<link rel="me" href="https://fosstodon.org/@mzhang" /> <link rel="me" href="https://fosstodon.org/@mzhang" />
<link rel="alternate" type="application/rss+xml" title="RSS Feed" href="/index.xml" />
{{ end }} {{ end }}
{{ $style := resources.Get "sass/main.scss" | resources.ToCSS }} {{ $style := resources.Get "sass/main.scss" | resources.ToCSS }}

View file

@ -13,6 +13,7 @@
{{ end }} {{ end }}
</div> </div>
</div> </div>
<div class="bio"> <div class="bio">
{{ os.ReadFile "layouts/partials/left-nav.md" | .RenderString }} {{ os.ReadFile "layouts/partials/left-nav.md" | .RenderString }}