Elektrine
Log in Register
Paige Chat Timeline Gallery Friends Email Drive DNS Private DNS Domains VPN Kairo Nerve
Remote

zwarich

@zwarich@hachyderm.io
mastodon 4.7.3
  • Open on hachyderm.io

Programming language & compiler enthusiast, computer architect. Creator of Rosetta 2.

522 Followers
42 Following
50 Posts
Joined December 16, 2022
Open post
zwarich @zwarich@hachyderm.io
· 2w ago

After a long discussion on the Lean Zulip, Mario Carneiro has shown that the Calculus of Inductive Constructions (in its full version w/ large elimination of Acc) + Excluded Middle proves that ZF is consistent:
https://arxiv.org/abs/2609.23143
It is fairly simple to show that Aczel’s type of sets as well-founded trees is a model of ZF without Replacement, and even a bit further, that the iterative hierarchy V_alpha exists for all ordinals alpha, but Replacement seems very analogous to Unique Choice, and there is (as far as I am aware) no syntactic construction that can show the relative consistency of UC (or LEM) over CiC w/ large elimination of Acc.

Instead, the proof of consistency roughly proceeds by dichotomy on whether the image of a set by a functional relation is sufficiently bounded. If it is, the set can be constructed, thus establishing the Axiom of Replacement and the consistency of ZF; otherwise the ranks of the sets show that V_alpha for their limit alpha is already a model of ZF.

This is an amusing trick in that it answers the question in presence of LEM, but doesn’t shed any light on the relationship between Unique Choice and Replacement (or stronger type-theoretic choice principles and Collection).

CIC + EM $\vdash$ Con(ZF): the consistency of ZF in type theory with excluded middle and no choice
arXiv.org

CIC + EM $\vdash$ Con(ZF): the consistency of ZF in type theory with excluded middle and no choice

The sets-as-trees interpretation of set theory in a dependent type theory with an impredicative universe of propositions validates Zermelo set theory, and it validates Replacement if the type theory has a choice or description operator, which turns a functional relation into a function. It has been natural to expect that without such an operator the strength of the type theory drops well below that of $\mathrm{ZF}$. We show that it does not. In the type theory of Lean with two predicative univer

26
0
8
0
Open post
zwarich @zwarich@hachyderm.io
· 1w ago

I don't even eat dumplings anymore, I just buy into a dumpling REIT

2
0
2
0
Open post
zwarich @zwarich@hachyderm.io
· 2w ago

After playing around with various attempts to construct models of ZF (or IZF) in the Calculus of Inductive Constructions, I can say that CiC (even with LEM) is severely deficient compared to ZF/IZF in terms of what can be done without assuming some form of Choice. I think that Lean's banishment of these problems by just assuming Choice throughout the ecosystem might be no small part of its appeal to mathematicians.

2
0
0
0
Open post
zwarich @zwarich@hachyderm.io
· 2mo ago
11
0
3
0
Open post
zwarich @zwarich@hachyderm.io
· 1mo ago
Boosted by @joe@f.duriansoftware.com
Replying to
@joe@f.duriansoftware.com read the PROGRAMMERS.md for more info on the codebase.
3
1
1
0
Open post
zwarich @zwarich@hachyderm.io
· 1mo ago
Replying to
@joe@f.duriansoftware.com
2
1
0
0
Open post
zwarich @zwarich@hachyderm.io
· 3mo ago
Replying to
@slava@mathstodon.xyz @joe@f.duriansoftware.com There is a parallel opinionated approach to sorting. You get rid of comparison-based sorting and give every type a discriminator to implement generic radix sort: https://www.cambridge.org/core/journals/journal-of-functional-programming/article/generic-topdown-discrimination-for-sorting-and-partitioning-in-linear-time/B85E48EFC0B4D2BDDDE9A3885094FDD7
Generic top-down discrimination for sorting and partitioning in linear time* | Journal of Functional Programming | Cambridge Core
Cambridge Core

Generic top-down discrimination for sorting and partitioning in linear time* | Journal of Functional Programming | Cambridge Core

Generic top-down discrimination for sorting and partitioning in linear time* - Volume 22 Issue 3

6
0
3
1
Open post
zwarich @zwarich@hachyderm.io
· 2mo ago

The latest Lean soundness hole (https://github.com/leanprover/lean4/issues/14576), which also affects alternative implementations of the kernel, is proof that God only ever intended for us to use W-types, and certainly not nested inductives.

github.com
2
0
1
0
Open post
zwarich @zwarich@hachyderm.io
· 2mo ago

I’ve seen a number of people speak about a representation of datatypes in ML where a datatype is given by a module with an abstract type and its constructors. Obviously, this is missing some additional information to define pattern matching, e.g. a recursor. Has anyone actually worked out all of the details?

2
3
0
0
Open post
zwarich @zwarich@hachyderm.io
· 3mo ago
Replying to
@joe@f.duriansoftware.com @slava@mathstodon.xyz Bro spent too much of his formative years reading discussions retconning incorrect but plausible reasons why C UB exists and decides to just create their amalgam.
3
0
0
0
Open post
zwarich @zwarich@hachyderm.io
· 3mo ago
Replying to
@slava@mathstodon.xyz @joe@f.duriansoftware.com @SRAZKVT@tech.lgbt @pinskia@hachyderm.io You also want no unspecified padding so that (in most cases) equality, hashing, etc. are bytewise. I tried to think of a good way to have a trait system that tracks this at the type level (and composes it in the right fashion), but everything I came up with seemed very arbitrary.
3
12
0
0
Open post
zwarich @zwarich@hachyderm.io
· 2mo ago
Replying to
@foonathan@fosstodon.org @joe@f.duriansoftware.com @slava@mathstodon.xyz Yeah, I am actually surprised that more languages don't have more first-class support for "fields" that are logically caches of functions applied to other fields. Lean has something like this, but since it's a purely functional language it exists mostly to add optimizations to the code without reducing the ability to prove things about it.
2
7
0
0
Open post
zwarich @zwarich@hachyderm.io
· 3mo ago
Replying to
@slava@mathstodon.xyz @joe@f.duriansoftware.com There is actually a whole field of history-independent data structures, including a history-independent linearly probed hash table. Whenever data structures people invent things like this I assume they have bad characteristics in practice, though.
2
10
0
0
Open post
zwarich @zwarich@hachyderm.io
· 3mo ago
Replying to
@slava@mathstodon.xyz @joe@f.duriansoftware.com Yeah, I was going to say that maybe this is just God encouraging you to use integer indices rather than pointers. You could also use data structures whose interface forbids you from iterating over the contents in a manner that exposes the underlying address ordering. However, I’m not aware of a type system that would fundamentally allow having pointers but prohibiting their bits from leaking.
2
0
0
0
Open post
zwarich @zwarich@hachyderm.io
· 3mo ago
Replying to
@joe@f.duriansoftware.com @slava@mathstodon.xyz The cringier version of this is “we are, it’s just CISC code running on a JIT in HW targeting a RISC architecture”.
2
1
0
0
Open post
zwarich @zwarich@hachyderm.io
· 3mo ago
Replying to
@Gankra@toot.cat @slava@mathstodon.xyz @joe@f.duriansoftware.com I’d even be okay with the IDs if I could easily get rid of the bounds checks (while still using a natural coding style).
2
5
0
0
Open post
zwarich @zwarich@hachyderm.io
· 4mo ago
Replying to
@joe@f.duriansoftware.com Use the path syntax from the user’s OS so that SW is inherently unportable.
3
6
0
0
Open post
zwarich @zwarich@hachyderm.io
· 2mo ago

we need to consider deceleration

1
1
0
0
Open post
zwarich @zwarich@hachyderm.io
· 3mo ago
Replying to
@joe@f.duriansoftware.com Is there COBOL.NET so I can use Godot or Unity?
2
3
0
0
Open post
zwarich @zwarich@hachyderm.io
· 4mo ago
Replying to

@joe@f.duriansoftware.com @tjammer@mastodon.gamedev.place Mathematica had it right all along: use [] for function calls.

2
3
0
0
Open post
zwarich @zwarich@hachyderm.io
· 3mo ago
Replying to
@slava@mathstodon.xyz @joe@f.duriansoftware.com The original story was single-tier JIT with monomorphization at runtime. They experimented with AOT solutions for desktop apps, and then at some point they added a tiered JIT along with an interpreter that works more like Swift’s baseline model and uses metadata. I think the current AOT solution is totally different and closer to the JIT compiler.
1
0
0
0
Open post
zwarich @zwarich@hachyderm.io
· 3mo ago
Replying to
@slava@mathstodon.xyz @joe@f.duriansoftware.com Yeah, I don’t think doing things bitwise fundamentally complicates things.
1
33
0
0
Open post
zwarich @zwarich@hachyderm.io
· 3mo ago
@joe@f.duriansoftware.com @slava@mathstodon.xyz I know we talked about this as part of a shitpost thread, but can either of you think of a good way to combine traits (i.e. type classes) and bytewise equality / hashing while still preserving as much parametricity as possible? The natural thing is to have some marker trait with C++ style specialization, but that destroys a lot of the properties that you would want. @joe@f.duriansoftware.com mentioned (jokingly but maybe not) to just make it required and see how far you get. You could do something where you somewhat extend the meaning of bytewise comparability to recurse to slices (e.g. for contents of dynamic arrays) while excluding some fields at the end (e.g. for capacity fields of dynamic arrays, although perhaps you could just handle this by a coercion from a dynamic array to a slice?). I don't see a great way to get extensional hash sets, though.
1
47
0
0
Open post
zwarich @zwarich@hachyderm.io
· 4mo ago
Replying to
@joe@f.duriansoftware.com All of #Constructor, $Constructor, and ^Constructor seemed kind of lame. Maybe I'll think of something else.
0
10
0
0
Open post
zwarich @zwarich@hachyderm.io
· 3mo ago
Replying to
@joe@f.duriansoftware.com @slava@mathstodon.xyz So no nested spans, just flat spans of bit ranges with no internal stride?
0
4
0
0
Open post
zwarich @zwarich@hachyderm.io
· 3mo ago
Replying to
@joe@f.duriansoftware.com @slava@mathstodon.xyz @SRAZKVT@tech.lgbt @pinskia@hachyderm.io Would you actually do ZII by default or simply track types for which the desired default value is zero? Would you require memcpy behavior but allow D-style postblit constructors?
0
1
0
0
Open post
zwarich @zwarich@hachyderm.io
· 4mo ago
Replying to
@slava@mathstodon.xyz @joe@f.duriansoftware.com would need to add RAG for kdb
0
2
0
0
Open post
zwarich @zwarich@hachyderm.io
· 1d ago
Replying to
@joe@f.duriansoftware.com @fay59@tech.lgbt after the AI apocalypse we'll all go back to cooperative multitasking, so this won't be a problem
0
1
0
0
Open post
zwarich @zwarich@hachyderm.io
· 3w ago
Boosted by @joe@f.duriansoftware.com
Replying to
@joe@f.duriansoftware.com Me: you using the Duo? Joe: yep
0
0
1
0
Open post
zwarich @zwarich@hachyderm.io
· 1d ago
Replying to
@joe@f.duriansoftware.com @fay59@tech.lgbt I think CPUs should have string instructions from clearing, copying, comparing, and hashing memory (with a few different kinds of hash functions for the latter, e.g. checksum, hash table hash, and cryptographic hashes). CPU microarchitects generally don't like this for a number of reasons, but we must find a way.
0
1
0
0
Open post
zwarich @zwarich@hachyderm.io
· 4mo ago
Replying to

@joe@f.duriansoftware.com It cracked me up to learn that even Java has switch expressions now.

I think my current aesthetic preference is for every construct to work as an expression, and to treat blocks as a distinct form of expression that needs to end with a yield of a value rather than just implicitly returning the final value. Implicitly returning the last value imposes a lot of syntactic restrictions, especially when you're using the Fortress/Swift approach for reducing the need for semicolons.

0
17
0
0
Open post
zwarich @zwarich@hachyderm.io
· 2mo ago
Replying to
@joe@f.duriansoftware.com those frigid mustelids
0
1
0
0
Open post
zwarich @zwarich@hachyderm.io
· 3w ago
Replying to
@joe@f.duriansoftware.com At least the agent civilization didn't immediately make a golden calf.
0
1
0
0
Open post
zwarich @zwarich@hachyderm.io
· 4mo ago
Replying to
@joe@f.duriansoftware.com I've got it: prefix within a line, with postfix chaining across lines. Sadly, I can't think of the best way to do control structures in this model.
0
6
0
0
Open post
zwarich @zwarich@hachyderm.io
· 4mo ago
Replying to

@joe@f.duriansoftware.com Is there another way to support both relative enum .constructor(...) syntax and Swift-style semicolon avoidance while implicitly returning the last expression? That was the main constraint forcing me to have some sort of marker keyword for the last expression.

0
15
0
0
Open post
zwarich @zwarich@hachyderm.io
· 2mo ago
Replying to
@foonathan@fosstodon.org @joe@f.duriansoftware.com @slava@mathstodon.xyz What's actually prohibited in between the suspend/resume pair? Using internal pointers?
0
9
0
0
Open post
zwarich @zwarich@hachyderm.io
· 1mo ago
Boosted by @joe@f.duriansoftware.com
Replying to
@joe@f.duriansoftware.com nvi is kosher-for-passover coke, made with 100% real sugar
0
0
1
0
Open post
zwarich @zwarich@hachyderm.io
· 3mo ago
Replying to
@joe@f.duriansoftware.com I use a cocaptcha. You need to review captcha inputs and pick the ones corresponding to actual humans.
0
0
0
0
Open post
zwarich @zwarich@hachyderm.io
· 4mo ago
Replying to
@joe@f.duriansoftware.com It’s funny how many of the tricks used to make language models work well on natural language reintroduce some of the limitations of humans, e.g. with subject-verb dependency distance, even though an attention mechanism with a gigantic context doesn’t have the same working memory limitations as humans.
0
0
0
0
Open post
zwarich @zwarich@hachyderm.io
· 3mo ago
Replying to
@slava@mathstodon.xyz @joe@f.duriansoftware.com I wanted to find some old slides from Alexandrescu where he was arguing that specialization is required for efficient systems programming. The dream of full parametricity might be fleeting; D could be the final evolution of C.
0
15
0
0
Open post
zwarich @zwarich@hachyderm.io
· 3mo ago
Replying to
@joe@f.duriansoftware.com @slava@mathstodon.xyz I meant the latter. In this case, you really want to specialize equality of slices for element types that implement bytewise equality, for example.
0
1
0
0
Open post
zwarich @zwarich@hachyderm.io
· 4mo ago
Replying to

@joe@f.duriansoftware.com I also thought of that, but if you have two separate projection operators in your language (which is an acceptable choice) then :: would probably have the same problem as .. I guess you could do it without having :: as a "static" projection operator, but it would be a bit weird.

I think Rust is still debating whether to support _::Constructor(...), along with companion _ { ... } instead of Struct { ... }. I don't think they could make ::Constructor(...) work because of the extern prelude. I think I also saw someone who wanted Zig's .{ ... } for structs.

0
8
0
0
Open post
zwarich @zwarich@hachyderm.io
· 4mo ago
@joe@f.duriansoftware.com Why did Swift never get block expressions? Was nice trailing lambda syntax worth more?
0
21
0
0
Open post
zwarich @zwarich@hachyderm.io
· 2w ago
Replying to
@joe@f.duriansoftware.com 3D modeling is cool and all, but I don't think everyone can become a Maya artist.
0
1
0
0
Open post
zwarich @zwarich@hachyderm.io
· 3mo ago
Replying to
@slava@mathstodon.xyz @joe@f.duriansoftware.com I put Fable on the job
0
2
0
0
Open post
zwarich @zwarich@hachyderm.io
· 4mo ago
Replying to
@joe@f.duriansoftware.com Can you easily do that in a non-sexp-based language without using indentation for nesting?
0
1
0
0
Open post
zwarich @zwarich@hachyderm.io
· 4mo ago
Replying to

@joe@f.duriansoftware.com What syntax were you proposing, do { ... } or something else?

0
19
0
0
Open post
zwarich @zwarich@hachyderm.io
· 1mo ago
Replying to
@joe@f.duriansoftware.com helix : coke zero
0
2
0
0
Back
313k7r1n3
Elektrine

Tor hidden service

elekhj7afj4qnrr4yd3bkzslsyo5jgfxw3orgjkhlcxifueodybyiiad.onion

I2P eepsite

j6b6cyk6gjmepjih7jjadxgxvvf3lzzujljuu2v4biemzpg3naya.b32.i2p

Platform

  • Email
  • Chat
  • Timeline
  • VPN
  • DNS

Company

  • About
  • Contact
  • FAQ
  • Lite (no JS)

Legal

  • Terms of Service
  • Privacy Policy
  • Transparency Report
  • Report Abuse
  • Warrant Canary
  • VPN Policy

Support

  • support@elektrine.com
  • Report Security Issue
Mail client setup IMAP mail.elektrine.com:993 POP3 mail.elektrine.com:995 SMTP mail.elektrine.com:465
© 2026 Elektrine. All rights reserved. Server: 18:21:06 UTC