λ Calculus – Equivalence and Substitution

By mohammedsafwat | March 28, 2010

In this posts, I just “state” somethings about the dealing with equivalence and substitution in λ calculus.

The equational proof system of lambda calculus has the equational axiom:

λ.x.M = λy.[y/x]M

Where [y/x]M is the result of substituting y for free occurrences of x in M and y cannot already appear in M.

There are three other equational axioms and four inference rules for proving quational terms.We need only to look at one other quational axiom.

The central equational axiom of lambda calculus is used to calculate the value of a function application (λ.x.M)N = [N/x]M , which is called the axiom of β eqivalence.

The value of λf.fx applied to λy.y maybe calculated if the argument λy.y is substituted in for the bound variable f:

(λf.fx)(λy.y) = (λy.y)x

(λy.y)x maybe simplified by additional substitution:

(λf.fx)(λy.y) = (λy.y)x = x

because λ bindings in M can conflict with free variables in N, substitution [N/x]M can be more complicated as we might think.

I hope that I’ll continue talking about λ-calculus in the upcoming posts insh’Allah.

كفاية كده

By mohammedsafwat | October 7, 2009

الناس اللى شافتنى الايام اللى فاتت حست قد ايه انا فى حالة نفسية سيئة ” اللى بقى الطبيعى يعنى” و كانوا  بيسألونى ليه؟ انا ممكن ارد بقى و اقول ليه..

بعيدا عن المشاكل العادية اللى بتحصل لكل الناس .. هنتكلم فى نقطة تانية دلوقت..

الموضوع انى حاسس فعلا انى مبقيتش قادر .. لا قادر اعمل حاجة .. ولا قادر اقعد فى مصر .. و قررت ابيع .. كل حاجة

مبدئيا ممكن يبقى الغلط منى .. مش شرط فى مصر يعنى .. بس هقلكم انا حاسس بايه ..

انا حاليا متعقد و متضايق جدا جدا من الجامعة و الكلية بصفة خاصة..

الناس طبعا عارفة ان الكات كان المفروض تنزل اول 3 ايام فى الدراسة فى خيمة اتحاد الطلاب..

نروح نلاقى الكات ملهاش مكان و حتى مش كاتبين اسمنا مع الاسر على الورق اللى بيوزعوه .. مش مشكلة احنا اكبر من التفاهات دى ..

تلاقيهم بيقولولك لازم تحط لوجو الاتحاد على كل بوستراتك و اى شئ يطلع من عندك .. هو كده

مش مشكلة برضه

المهم اول يوم معملناش حاجة .. بس كان المفروض ندخل حاجتنا الجامعة .. اللى حصل بقى ان الحاجات دى علشان تدخل كان لازم اجيب واحد من اتحاد الطلاب علشان يعديهالنا من البوابة .. جبته , وخلى بالك كمان ان بتوع الاتحاد دول بيكلموك بأسلوب سئ جدا , لدرجة انى شديت مع ناس متهم اخر يوم.. المهم , واحنا داخلين وقفونا تقريبا كأننا معانا قنابل او حاجة ..

وقعدوا يتفرجوا على كل شئ ..

كان معانا folders بتاع الكات اللى بنوزعها .. المهم اللى على البوابة يمسك الفولدر و يتفرج عليه و يقلك ” طيب يعنى ايه البتاع ده”؟ نقوله دا فولدر بيتحط فيه ورق ” يقلك يعنى ايه فولدر؟” وورق ايه ده؟ وهو فين؟!

كان معايا catazine و البروجكتور بتاعنا .. قالك بس .. دول اعضاء الجماعات المحظورة .. واتصل ب”**” بيه..

المهم .. “**” بيه ده كلم اللى كان معايا, وبعدين قاله اقفل و هكلمك تانى و قام قافل موبايله .. كاننا بنشحت منه مثلا..

معاملة الناس اللى على البوابة فى غاية السوء .. و بيكلمك من مناخيره بالنضارة السودة اللى هو لابسها كانى بشتغل عنده ..

رتبة كبيرة قاعدة جنبه و مش عارفين يعنى ايه فولدر!!

المهم .. دخلنا الاوضة بتاعته و اتصل بقائد الحرس بتاعنا .. بعت معانا عسكرى لحد مكتيه .. هو بصراحة قائد الحرس اكثرهم احتراما .. ودخل لنا الحاجة .. ودا اول يوم..

تانى يوم تلاقى مسابقة فى الجامعة “وجايبين سماعات ” – وخلى بالك من دى – زى بتوع ال DJ

و ” يلا مين هيشد الحبل قدام فريق الاتحاد .. ” مين  هينافس حنفى .. فرغلى بينط الحبل .. جامد يا فرغلى

وقمة التفاهة و الهبل اللى فى الدنيا .. وليهم خيمة ايه .. مقلكش!

نيجى احنا ندخل سماعتنا .. ميرضوش ..

واضطر احمد بكر يسيبها عن واحد صاحبه قدام الجامعة .. لحد ما دخلناها تانى يوم س 11 بليل بعربية احمد مدكور…

دا بس بالنسبة لنقطة حرس الجامعة و اللى حكيتها باختصار..

انا لما بنزل الكلية و اشوف منظر الناس هناك بيجيلى احباط شديييد جدا, لما بدخل المدرج بكون مش عاوز اكمل و اخرج..الناس نفسها عايشة فى حالة من التوهان .. كنا لما نحط حاجة الكات فى مدخل الكلية محدش يجى يسألك انتم مين .. بس بيسألوا على الجداول !!

لما نشغل فيديوهات الكات القديمة تلاقى ناس هبلة تيجى تقلك شغلنا كليبات .. وناس تقلك بلاش اغانى ووطى الصوت و ما الى ذلك ..

الطلبة فعلا يجيبوا احباط و تبقى حاسس انك مش طايق حد يكلمك ولا تكلم حد..

الدكاترة كل واحد يدخلك يقعد يتكلم على نفسه شوية و يقلك انا بقالى مش عارف كام سنة بدرس و هجيبلكم اسئلة المعيد ميعرفش يحلها , وبشوف بضهرى احسن من وشى, و هعرف اجيبك, ويبدأ يعدلك فى مزاياه اللى بقيت حاسس انه يناقص يقلك انه كمان فول اوتوماتيك..

وطول المحاضرة ” انت ياله” وياريتها تيجى على قد ” ياله “بس دون ادنى احترام لكرامتك او شخصيتك كبنى ادم..

انت قاعد اصلا و مش عارف اخر اللى بتقال ده ايه؟ ايه الهدف من الكلام ده؟

وتلاقى البنات بقى ماشاء الله نازلين كتابة وهما اصلا مش فاهمين بيكتبوا ايه .. بس بيكتبوا و خلاص .. حاجة تغيظ!

انا فعلا تعبان جدا و لو فضل الوضع كده هتعب اكتر .. قرفت و زهقت من كل شئ .. خلى بالك الكلام ده بيتقال من واحد المفروض انهم بيقولوا عليه من اوائل الدفعة .. بس مبقاش يفرق معايا طالما هطلع “قلة” فى الاخر و مليش لازمة ..

انا مش شايف ان فى حل .. الحل اننا نغير القائمين على كل شئ فى البلد دى … واولها القائمين على التعليم .. يعنى ميجيش واحد يقعد يشرحلك فى كتاب بقاله اربعين سنة و هو نفس الكتاب بنفس الاخطاء .. حتى اخطاء الغلاف.. وياريته حتى بيشرح .. دا بيقرالك الكلام من على ال presentation

اللى هى اصلا الكتاب اللى معانا..

وهل الاربعين سنة دول العلم فيهم متغيرش؟!

وهل اخطاء الغلاف مش واضحة للدرجة اللى تخليهم يعملوا غلاف جديد؟

هل لما حد يقرالى الكلام يبقى انا كده اتعلمت؟ طيب ما هو كان ممكن يوفر تعبه وانا اوفر وقتى واقعد اقرا الكلام ده مع نفسى..

فى حد فى الدنيا كلها ياخد غياب فى المحاضرات؟

طيب ما هى الناس مش هتحضر علشان مش عارفة الكلام ده و المواد دى فايدتها ايه .. واصلا الكلام ده كله فى الاخر مبيأكلش عيش يعنى .. انت كل سنة بتدخل و عندك مثلا 12 كورس يمكن حتى الناس بتدخل و مبتعرفش اسمائهم الا فى اخر السنة كده..

فى حد يحط امتحان و هو مش عارف هو “لزق” الامتحان ده منين و فيه اخطاء و حاجات مش عليك؟

هل من العدل انك تساوى بين الناس اللى بتجتهد واللى بتجيب الامتحانات بفلوسها؟هل من العدل انك يا معيد تظبط اعمال السنة بتوع الناس اللى بياخدوا عندك كورسات؟

هل ممكن يبقى عندك دافع انك تغير حاجة فى بلدك او تعملها شئ و اصلا اللى المفروض يزرعوا فيك ده بيحبطوك و يقولولك ” المجتمع فاسد وانت واحد منهم”؟ طيب ما انتم اللى خليتوا المجتمع فاسد ..انتم اللى عملتم شباب تافه و فاضى وبلا هدف .. وبنات كل اللى فى دماغها اللبس و الميك اب .. وعالم تايهة فى دوامة و المشكلة انهم بياخدوا الباقيين معاهم فى سكتهم..

مش عارف بس انا حاسس ان الناس دى المفروض تدخل التعليم من جديد .. ويتعلموا اصول التدريس و التربية علشان يعرفوا يطلعوا جيل “يمكن” يعمل حاجة..

احنا عمرنا ما هنتغير و لا هنتقدم الا لو كنا عاوزين ده ..

يجى حد يقلك ابدأ بنفسك .. اقلك برضه مينفعش لانى جربت .. بتطلع انت الوحش فى الاخر .. الكلام ده مينفعش فى بيئة مش متقبلة ده .. زى ما نجيب تفاح نحطه وسط بتنجان .. لا التفاح هيبقى بتنجان ولا البتنجان هيصحى الصبح يلاقى نفسه تفاح..

يجى يقلك عندك مقرر اختيارى .. يعنى من حق كل واحد يختار اللى هو عاوزه .. تروح تختار يقلك خلاص الدكتور مش عاوز الا 50 ..

يا سلام؟وانا حقى فين بقى انى اختار؟طيب سميتوها ليه اختيارى بقى؟

أنا حاليا فى أسوأ حالاتى .. مش عاوز انزل .. مش عاوز اشوف حد من الكلية ولا اعمل اى شئ هناك..محبط جدا ويائس تماما ..

زهقت من كل شئ .. اعتقد انه من حقى انى اتعلم كويس .. واتعلم شئ يفيدنى و احس فعلا انه بيفيدنى .. اعتقد انه من حقى اتعامل كانسان .. ومش عاوز حد يستخف بعقولنا زى ماهما بيعملوا و محسسينا ان دا فعلا تعليم وشئ كويس والناس بتضحك على نفسها وتضيع وقتها و خلاص .. اعتقد انى مش لازم اتحارب علشان عاوز اكون كويس .. اعتقد انه “كفاية كده”..

CAT Coordinator..yes or no ?

By mohammedsafwat | April 18, 2009

Being CAT Coordinator ..

one of the most dreams really I have hoped to be done..

one of the most important wish list items..

Since I joined this team .. and I put my eyes to be the coordinator ..

and today .. there’s a chance to make the dream a true .. but shouldn’t we think before any important step in our life ?

Yes .. specially with a matter regarding CAT coordination ..

First of all , our prophet Muhammad ( peace be on him ) told us the following :

لا تسأل الإمارة، فإنك إن أعطيتها عن مسألة وكلت إليها، وإن أعطيتها عن غير مسألة أعنت عليها”

and so I think alot before doing such thing..

I want people to say that ” Now , You are the only one who can be the coordinator “.. I do not like being a normal one or an ordinary person , and I don’t like also running after things to happen.. I believe that Allah will send this to me when I’m ready for it ..so , If I didn’t reach this state till now , so I can say that I’m not valid to be a Coordinator .. !

- But imagine if people suggested me to be the coordinator.. why am I afraid   from holding this position?

Because simply you can see the previous coordinators and reply!

in our society , or let’s say in our CAT community , the coordinator is responsible for everything .. from delivering the Projector to every session..to making the posters of any event , specially Scopes ..!

Really , the coordinator is not supposed to do all this , but surroundings force him to do that..and so I’m afraid to be in their situation one day .. where I find myself alone.. making everything!

I imagine the following:

Before Scope , say before it with 3 weeks , I require the designs of scope from ” X” person , and this ” X” will be very excited to do them , and at the same day he sends me a primary design of his idea .. and I’m really happy to see people work..but this week goes with nothing , the second the same , and there will be 3 or 4 days before the event..

- ” Where are the designs ?”

- “Today you will receive them.. ” ..

and of course I do not receive anything , and I’ll be very late for making propaganda , and I’m forced now to sit down to finish all the posters , printing them , and I have to stick them also around the faculty .. alone !

This is the most bad situation I do not like to face , because at that time , I depended on people to finish their tasks , also I have tasks to do , and do not forget that my time is not for CAT only , I have many important things that I’m responsible to deliver them at high quality also..But after that , you see that all things are collapsing..specially your schedule and your life.

So , if people chose me to be their Coordinator , the first thing to do is to bring ” مصحف ” and make them swear that they will work ! I will do that because I will arrange everything to be sharp..and there’s no way to give up at anytime..and because I do not want to loose anything that can be avoided to loose..My life will be affected greatly by this , and because there’s another reason that I will discuss below , and it’s a matter with high importance to me .. and must be the first to be considered …

I do not want my rank or grade at the faculty to be affected by coordination..really this matters me .. and this is the most thing that I’m thinking alot about ..

So see if anyone gives up his tasks at anytime , how I will be affected !

OK , but lets set the shortcomes that I find in CAT , and I hope to change them insh’Allah :

1- I remeber when I first knew about Scopes ” Scope 8 ” , I wanted to register my ID , and I logged in to make that on scope.catreloaded.net , and I found this statement ” Choose foundation ” and the options were ” Hackers , Depiak , PixiCAT , … ” and I didn’t know what that mean! I tried to make search about that or find any page at their sites , but no way!

I felt that I was the only person who is this stupid , but I asked many people late , and they didn’t have complete information about CAT activity or hierarchy at this time ..

The matter is how can we take care of the newbies .. how can we make them more attracted to our activity , not to make them ” lost ” !

2- Scope = CAT and CAT= Scope ..

Many people think that CAT is only Scope .. they do not know anything else !they even do not know what’s the foundations system and what are their activities .. what’s the core members and why …and I can say that the fault here is shared between us and them .. us for not considering that , and them for not asking about that !

3- We do not have any organizing for our work .. we are walking in our way “بالبركة” and this is not efficient in leading a big community , specially CAT.

everything is made in rush .. we are always at the last moment , and even we do not have a team work management system.. I feel that in CAT everybody can make everything..and this is not good.

4- Members do not know each other! No social relationships in CAT or we are not considering this matter with good care .The Social relationships is limited on some people , or let’s say on the core members only ..

5- People do not feel how CAT is great , and why it’s a MUST to join a community..they just enter to take take and take .. not to give ! and this is also shared between both of us .. because we do not tell them how it’s great to give CAT somethings , even they are little , not to just take.I think also there’s not a clear target for CAT , or at least for the newbies.

6- _______|_________|______|_______

The above curve represents CAT’s state from ” September to June ” ..

It’s a relation between time on the horizontal , and work on the vertical..

Nothing , except those pulses which can represent scopes or days .. only.

7- People do not like to work. And this is a problem that until writing this post I do not find a solution for ..

Imagine that we didn’t make any project since 4 years..Why?!

8- I feel that every foundation seems to be a separated team from CAT .. sometimes , people imagine that ” Hackers” for example is a team , and ” CAT ” is another team .. and they are not related to each other!

I do not criticize the previous coordinators at all ..

But these are the most clear problems I see now , and I hope to be changed ..

Here’s a mind map for CAT , I have made : Here

I hope to make the following :

1- There will be a person responsible for sponsors , to talk to them , for Scopes , Days , and CATazine , to get money and offers from them , and to be the link between them and CAT.This person will be responsible also to just “get ” the sessions from them , and the articles or offers regarding CATazine , and deliver them to the people in responsibility after that.

2- There will be a person responsible for organizing sessions and workshops themselves , to see what suitable time for them , and to talk to the presenters . This will be applied to scopes , days and regular sessions and workshops.So , if any one wants to make a session , he will contact this person(Say X) ,X will inform the core members or the coordinator  , and he will reply to the session request. He is also responsible to see what sessions do people want ” by making surveys and polls , ..”.This person will be responsible to update the notification system and Calendar with dates and times for any event , and he will inform the man of the projector to get the projector and/or sound system at the sessions’ times.He will be responsible of the schedules of any event , organizing them with every foundation , and updating the notification system with them , delivering them to the designers to make posters or flyers.(X) should contact with the designers and telling them the deadlines for their work after discussing it with the coordinator or core members. . He will get the ” commenters ” if needed in any event , Like ” scope commentet”.Meetings also will be organized by him ” Like Scope meetings and Days ” after talking with every foundation coordinator , and the general coordinator . Social meetings dates will be also organized by him ( Like CAT Iftar).

3- As said above , the man of the projector will be responsible for getting it , either for scopes , sessions and workshops.Sound system will be his responsibility also . It’s preferred for him to have a car , so he can get these equipment into the university  .!

4- There will be a person responsible for halls ( Writing Proposals , Reserving them , Getting ” Am Sameer Every day ” and ” تظبيط عم سمير” :) . This will be applied also to external halls ” Like Alhawar Hall for example “, he will reserve labs for workshops too , and inform training centers if we are going to make a workshop there .He will inform (X) about the final date of the event , so updates for the notification system and Designs will depend on that.Social events will be the same ( Like CAT Iftar).

5- Designs and videos :This person will be the only responsible in front of the Coordinator for design matters and videos . He can make a team to work with him , but at last, he must deliver his work before the deadline .He should contact with (X) regularly to see what to be done.He is responsible for all events in CAT , even making logos for projects .If any project team needs any design , so they will contact this person.He will also contact the man responsible for printing matters after finishing his designs.

6- Scope men : Some guys who will prepare the accessories ” folders and stickers .. ” , getting the coffee break , organizing the coffee break , Be on registration desks , help any one and reply for people request.Imagine that I want to distribute some papers for the attendants of my session , so they will do it .They will be found not in scopes only , but in days and workshops if needed.

7- Web Team : They will update the scope’s web page , CATazine’s web page ,feedback pages and maintain forums and wikis.

There will be a member of this team responsible for updating the TCDP , People responsible for wikis and Blogs ( will be arranged with every foundation )  , and updating our video channels.

8- Man with printing : He will be responsible for printing matters , form IDs to CATazine.He can gather a team and distribute task , but all things should be finished at times . He will receive a call from the man with designs , and do the job.

9- After Printing is done , CATazine will be delivered to ” Sales ” team , and Posters or Flyers will be delivered to ” Propaganda team ” .

Sales men : make the sales matters , and update the coordinator with their progress.

Propaganda team : Responsibilities :

- Stick posters for every event .

- Distribute flyers.

- Make online propaganda ” Facebook , mass mails , … “.

- Make offline sessions before big events  , or talking to people offline.

10- CATazine team :

- Contacting with the man responsible of sponsors , getting the articles and offers from him .

- Organizing articles to be published.

- Contacting the Designs man ( They can make a sub team for CATazine designs , but after this man’s supervision).

- Contacting the Sales team ( They can share them selling it ).

- Contacting the printing man.

- Contacting the Web Team , for developing the online system ( They can share them).

11- Social events : People responsible for them will collaborate with the man who reserves halls , and with the updater operator.They will get money from people , and pay for the required things .

12- Financial Resources :

Courses

Solutions

Donations

Sponsors

So there will be a man organizing the in and out , recording that and contacting coordinator for updates.

For Courses: Every foundation coordinator is responsible for organizing this matter in his foundation ,giving a list to the coordinator with proposed courses , duration and cost .Every foundation coordinator will meet the people who applied for courses , get money from them , and giving it to the financial person , he will contact the designers for posters if required , and the man who is responsible for the notification system to do his job.Of course , he will tell the venues man to reserve labs for these courses.

Solutions and Donations are matter not settled in my mind now , but to be discussed insh’Allah.

there will be a core online groups for all updates .

Team management system will be discussed after settling matters.

That’s my vision , that I hope to implement.

I know , there are short comes , so you are free to comment on anything.

Thanks in advance , and sorry for typo-mistakes.