Hot take: optics are better abstraction than lenses, in *all* use cases. Why? They make explicit all the things you're implicitly thinking about anyway when using lenses. I think they are really important in shaping how we think about bidirectional maps. A short thread. 👇 1/9

Optics make explicit 1) the internal state (residual) and 2) the fact that you need to have the base category either be Cartesian, or at the very least have the "get" maps be comonoid homomorphisms. Let's look at the state/residual.
2/9
In lenses, this state is always the same as the input and is implicit. This can be seen by repackaging the get map from get: X → Y to Δₓ;(get×X):X e→ Y×X. Now our new get map (in addition to computing the output) passes through the input. This is good for a few reasons. 3/9
First, this pleasantly symmetric with the put:X×Y'→X'. But also, this new map is now exactly the "left" map of an optic too. (It turns out put was all along the "right" map). This tells us that the passed-through input is actually the state we're remembering. 4/9
But most importantly, this formulation is now explicit in the use of the copy map Δₓ:X → X×X, which you might have not realized is needed if you were just thinking about the standard get-put formulation. Furthermore, when you were composing lenses, ... 5/9
the formulation of the composite of the put maps was always much more complex than get maps. But now it's obvious why you needed to do that: you were juggling the internal state/residual around, because it had to agree with the input. 6/9
But you don't need to do that with optics (and that's the whole idea): you can *choose* the internal state you want.
With lenses you're using a specific state anyway, but you aren't given the conceptual tools to talk about it.
But let's stop here and see what we've done. 7/9
Observe that we didn't really "add" any complexity so far. All we've done is distilled what was already there and gave it a name. That's the whole idea behind of a lot of category theory. 8/9
Now, we still have to pack up this new construction and be precise in its definition. That's exactly what the coend in the optic definition does. It might even look scary, but it turns out the coend is saying some incredibly natural things. But that's for some other time. 9/9
References:
Optics: https://t.co/nWBhDR0Hut
Generalized Lens Categories: https://t.co/C0gB06B9DE
Also, this perspective was first shared with me here: https://t.co/ThvRcV2j3t
Also, I should add a caveat that I'm not necessarily talking about *mixed* optics. These seem like a complex beast that I don't yet understand fully.

More from Health

🚨Important changes to lockdown/self-isolation regulations from 5pm

The Health Protection (Coronavirus, Restrictions) (All Tiers and Self-Isolation) (England) (Amendment) Regulations 2021

£800 'house party' FPN & police can now access track & trace data

https://t.co/k9XCpVsXhC


“Large gathering offence”

As trailed by Home Secretary last week there is now a fixed penalty notice of £800 (or £400 if you pay within 14 days) for participating in an gathering of over 15 people in a private residence


Fixed Penalty Notices double for each subsequent “large gathering offence” up to £6,400

Compare:
- Ordinary fixed penalty notice is £200 or £100 if paid in 14 days
- Holding or being involved in the holding of a gathering of over 30 people is £10,000


Second big change:

Since September has been a legal requirement to sell-isolate if you test positive/notified by Track & Trace of exposure to someone else who tested positive

Police can now be given access to NHS Track & Trace data if for the purpose of enforcement/prosecution


This will make it easier for police to enforce people breaking self-isolation rules. Currently there has been practically no enforcement.

Data says only a small proportion of people meant to be self-isolating are fully doing so.

You May Also Like

#ज्योतिष_विज्ञान #मंत्र_विज्ञान

ज्योतिषाचार्य अक्सर ग्रहों के दुष्प्रभाव के समाधान के लिए मंत्र जप, अनुष्ठान इत्यादि बताते हैं।

व्यक्ति के जन्म के समय ग्रहों की स्थिति ही उसकी कुंडली बन जाती है जैसे कि फ़ोटो खींच लिया हो और एडिट करना सम्भव नही है। इसे ही "लग्न" कुंडली कहते हैं।


लग्न के समय ग्रहों की इस स्थिति से ही जीवन भर आपको किस ग्रह की ऊर्जा कैसे प्रभावित करेगी का निर्धारिण होता है। साथ साथ दशाएँ, गोचर इत्यादि चलते हैं पर लग्न कुंडली का रोल सबसे महत्वपूर्ण है।


पृथ्वी से अरबों खरबों दूर ये ग्रह अपनी ऊर्जा से पृथ्वी/व्यक्ति को प्रभावित करते हैं जैसे हमारे सबसे निकट ग्रह चंद्रमा जोकि जल का कारक है पृथ्वी और शरीर के जलतत्व पर पूर्ण प्रभाव रखता है।
पूर्णिमा में उछाल मारता समुद्र का जल इसकी ऊर्जा के प्रभाव को दिखाता है।


अमावस्या में ऊर्जा का स्तर कम होने पर वही समुद्र शांत होकर पीछे चला जाता है। जिसे ज्वार-भाटा कहते हैं। इसी तरह अन्य ग्रहों की ऊर्जा के प्रभाव होते हैं जिन्हें यहां समझाना संभव नहीं।
चंद्रमा की ये ऊर्जा शरीर को (अगर खराब है) water retention, बैचेनी, नींद न आना आदि लक्षण दिखाती है


मंत्र क्या हैं-
मंत्र इन ऊर्जाओं के सटीक प्रयोग करने के पासवर्ड हैं। जिनके जप से संबंधित ग्रह की ऊर्जा को जातक की ऊर्जा से कनेक्ट करके उन ग्रहों के दुष्प्रभाव को कम किया और शुभ प्रभाव को बढ़ाया जाता है।