Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prove hooo::tauto_from_para_transitivity (challenge) #522

Closed
bvssvni opened this issue Nov 3, 2022 · 2 comments · Fixed by #532
Closed

Prove hooo::tauto_from_para_transitivity (challenge) #522

bvssvni opened this issue Nov 3, 2022 · 2 comments · Fixed by #532

Comments

@bvssvni
Copy link
Contributor

bvssvni commented Nov 3, 2022

I will give 200 USD to the first person that can prove (⊥^(a == b) ∧ ⊥^(b == c)) => (a == c)^⊤.

It is currently believed that proving the contradiction is impossible, but if somebody does it, then the reward will be equal.

The proof, if found, will be added to hooo::tauto_from_para_transitivity.

Currently, there are only 4 axioms for HOOO Exponential Propositions, see #502. Finding this proof will reduce to a set of 3 axioms.

@Uriopass
Copy link

Uriopass commented Nov 3, 2022

Could be fun to integrate exponential types to https://incredible.pm/ and try to make the visual proof

@bvssvni
Copy link
Contributor Author

bvssvni commented Nov 4, 2022

I found it:

/// `(false^(a == b) ∧ false^(b == c)) => (a == c)^true`.
pub fn tauto_from_para_transitivity<A: Prop, B: Prop, C: Prop>(
    para_eq_ab: Para<Eq<A, B>>,
    para_eq_bc: Para<Eq<B, C>>,
) -> Tauto<Eq<A, C>> {
    let x: Not<Eq<Para<A>, Para<B>>> = hooo_dual_eq(para_eq_ab);
    let y: Not<Eq<Para<B>, Para<C>>> = hooo_dual_eq(para_eq_bc);
    match (para_decide::<A>(), para_decide::<B>(), para_decide::<C>()) {
        (Left(para_a), Left(para_b), _) => imply::absurd()(x((para_b.map_any(), para_a.map_any()))),
        (_, Left(para_b), Left(para_c)) => imply::absurd()(y((para_c.map_any(), para_b.map_any()))),
        (Left(para_a), _, Left(para_c)) => {
            let z: Eq<Tauto<A>, Tauto<C>> = (
                Rc::new(move |tauto_a| imply::absurd()(para_a(tauto_a(True)))),
                Rc::new(move |tauto_c| imply::absurd()(para_c(tauto_c(True))))
            );
            hooo_rev_eq(z)
        }
        (_, Right(npara_b), Right(npara_c)) => {
            imply::absurd()(y(eq_not_para_to_eq_para((npara_c.map_any(), npara_b.map_any()))))
        }
        (Right(npara_a), Right(npara_b), _) => {
            imply::absurd()(x(eq_not_para_to_eq_para((npara_b.map_any(), npara_a.map_any()))))
        }
        (Right(npara_a), _, Right(npara_c)) => {
            let y: Eq<Para<A>, Para<C>> = eq_not_para_to_eq_para((npara_c.map_any(), npara_a.map_any()));
            let y: Para<Not<Eq<A, C>>> = hooo_dual_rev_neq(y);
            match program::<Eq<A, C>>() {
                Left(Left(tauto_eq_ac)) => tauto_eq_ac,
                Left(Right(para_eq_ac)) => imply::absurd()(pow_rev_not(y)(para_eq_ac)),
                Right(para_uni_eq_ac) => {
                    let nuni_eq_ac = Rc::new(move |x| para_uni_eq_ac(x));
                    let (x, _): And<Not<Tauto<Eq<A, C>>>, Not<Para<Eq<A, C>>>> = and::from_de_morgan(nuni_eq_ac);
                    let x: Tauto<Not<Eq<A, C>>> = hooo_rev_not(x);
                    imply::absurd()(y(x(True)))
                }
            }
        }
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants